Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 34,840
    • Issues 34,840
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 1,219
    • Merge Requests 1,219
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLabGitLab
  • Merge Requests
  • !23697

Merged
Opened Jan 24, 2020 by Sean Carroll@sean_carroll💬Developer5 of 5 tasks completed5/5 tasks

Collect release evidence at release timestamp

  • Overview 24
  • Commits 3
  • Pipelines 10
  • Changes 5

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.

Screenshot_2020-01-27_at_12.34.02

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)

Edited Jan 29, 2020 by Sean Carroll
Assignee
Assign to
Reviewer
Request review from
12.8
Milestone
12.8 (Past due)
Assign milestone
Time tracking
Reference: gitlab-org/gitlab!23697
Source branch: 38103-collect-release-evidence-at-moment-of-release-end-date

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.