Skip to content

Update security release pipeline notifiers to use task issue due date

Steve Abrams requested to merge delivery19453-sec-release-date-bug into master

What does this MR do and why?

This updates the various notifiers in the security release pipeline to use the due date on the current security release task issue rather than the next security release tracking issue.

This will prevent the wrong date from being used on critical security releases.

I chose to filter on the labels 'security', 'Monthly Release' because those are the labels used by all security releases: https://gitlab.com/gitlab-org/release/tasks/-/issues/?sort=created_date&state=closed&label_name%5B%5D=security&label_name%5B%5D=Monthly%20Release&first_page_size=20.

We check if the release is a critical release by looking at the SECURITY environment variable that is set in chatops. This allows us to use the security release tracking issue for regular releases and the security release task issue for critical security releases.

Local testing

I tested the new .current_security_task_issue method by changing the code to search for state: 'closed' since there are no security task issues currently opened. It correctly finds the most recent issue:

~/workspace/gitlab-org/release-tools (master ✗) RELEASE_BOT_PRODUCTION_TOKEN=REDACTED be pry --gem
[1] pry(main)> ReleaseTools::GitlabClient.current_security_task_issue
2023-07-05 11:03:21.074662 D ReleaseTools::GitlabClient -- [HTTParty] [2023-07-05 11:03:21 -0600] 200 "GET https://gitlab.com/api/v4/projects/gitlab-org%2Frelease%2Ftasks/issues" -
=> #<Gitlab::ObjectifiedHash:217400 {hash: {"id"=>REDACTED, "iid"=>REDACTED, "project_id"=>REDACTED, "title"=>"Critical security patch release: 16.1.2, 16.0.7, 15.11.11"....

Author Check-list

  • [-] Has documentation been updated?

Related to gitlab-com/gl-infra/delivery#19453 (closed)

Edited by Steve Abrams

Merge request reports