Collect release evidence at release timestamp
What does this MR do?
When a Release is created, determine if it is a Release, an Upcoming Release or a Historical Release. Passing the released_at
field to the API is the deciding factor.
The existing after_commit
hook on Release will be removed, and instead the CreateEvidenceWorker
call will be made in the API controller, after the Release object is successfully created.
after_commit :create_evidence!, on: :create, unless: :importing?
https://gitlab.com/gitlab-org/gitlab/blob/master/lib/api/releases.rb#L68-70
Current Release
If the released_at
field is not passed, it is defaulted to the current timestamp and the Evidence is created. The CreateEvidenceWorker
will be scheduled as perform_async
.
Upcoming Release
If a future released_at
timestamp is provided via the API, the CreateEvidenceWorker
will be scheduled for the future timestamp using the Sidekiq Scheduled Jobs feature, noting that it may not run exactly at the provided released_at
timestamp.
Historical Release
If the released_at
timestamp is provided and is in the past, an Evidence object will not be provided for this release.
Screenshots
Upcoming Releases are indicated as such, until the released_at
date passes. This is already implemented and not added by this MR.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation - Handled in separate MR.
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Part of #38103 (closed)
Merge request reports
Activity
changed milestone to %12.8
Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has randomly picked a candidate for each review slot. Feel free to override this selection if you think someone else would be better-suited, or the chosen person is unavailable.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not (yet?) automatically notify them for you.
Category Reviewer Maintainer backend Jay Swain ( @jayswain
)Peter Leitzen ( @splattael
)Generated by
DangerEdited by 🤖 GitLab Bot 🤖assigned to @sean_carroll
mentioned in commit b45c7a05
added 1 commit
- b45c7a05 - Collect release evidence at release timestamp
marked the checklist item Changelog entry as completed
mentioned in commit 9c4fd958
added 1 commit
- 9c4fd958 - Collect release evidence at release timestamp
mentioned in commit 6d6878a1
added 420 commits
-
9c4fd958...89664dde - 419 commits from branch
master
- 6d6878a1 - Collect release evidence at release timestamp
-
9c4fd958...89664dde - 419 commits from branch
marked the checklist item Code review guidelines as completed
marked the checklist item Merge request performance guidelines as completed
marked the checklist item Style guides as completed
- Resolved by Sean Carroll
Assigned to @jayswain for backend review.
assigned to @jayswain
added workflowin review label and removed workflowin dev label
@jayswain FYI it looks like
master
is currently broken. This push is green, but the rebase against master is failing.I'll try another rebase later today.
- Resolved by Sean Carroll
unassigned @jayswain
mentioned in merge request !23968 (merged)
- Resolved by Sean Carroll
Assigned to @splattael for maintainer review.
assigned to @splattael
- Resolved by Sean Carroll
- Resolved by Sean Carroll
- Resolved by Sean Carroll
- Resolved by Sean Carroll
- Resolved by Sean Carroll
unassigned @splattael
mentioned in commit a2fe6113
added 352 commits
-
6d6878a1...1e7a034e - 350 commits from branch
master
- a2fe6113 - Collect release evidence at release timestamp
- 862b6b08 - Apply reviewer suggestions
-
6d6878a1...1e7a034e - 350 commits from branch