Skip to content

Allow nil due dates for tracking issues

Steve Abrams requested to merge delivery19843-remove-due-date into master

What does this MR do and why?

As we move to having multiple security releases per month, we need to have more flexibility in our tooling for security release tracking issues. When they are created, they do not contain a due date. We need to allow this to be ok so our security-target tooling does not fail and continues to link issues even before the due date is set. This MR removes the logic that would raise an error on a nil due date. If there happen to be more than one security release tracking issue open (which is not expected), we return the one with the nil due date first since we can assume it is the newest tracking issue.

This MR also refactors the release_issue method in the crawler to use the Security::IssueHelper.security_tracking_issue method. All other classes that were making use of the related crawler method have been refactored to use crawler.security_tracking_issue. This refactor will close gitlab-com/gl-infra/delivery#19699 (closed).

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

Testing

[1] pry(main)> ReleaseTools::Security::IssueCrawler.new.security_tracking_issue
2023-11-17 08:50:35.028828 D [dry-run] ReleaseTools::GitlabClient -- [HTTParty] [2023-11-17 08:50:35 -0700] 200 "GET https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab/issues" -
=> #<Gitlab::ObjectifiedHash:217640 {hash:...

Author Check-list

  • [-] Has documentation been updated?
Edited by Steve Abrams

Merge request reports

Loading