Skip to content

Staging Workflow

Björn Geuken edited this page Mar 27, 2019 · 33 revisions

Basic relationships

  • A Project has one StagingWorkflow
  • A StagingWorkflow has many StagingProjects
  • A StagingProject has many StageRequests
  • A StagedRequest has one BsRequest
  • A BsRequest has many Reviews

StagingWorkflow

What is the meaning of "Backlog"?

Requests with open review by group that are not staged or excluded.

What does it mean that a BsRequest has a Review.by_group for a StagingWorkflow.managers_group?

To tell people that the request is going to be staged, and to prevent this request to be merged into the main project.

What is the meaning of "Excluded"?

Requests that the manager doesn't want to include in a stage. The belong to the model Staging::RequestExclusion.

StagingProject

What makes a project acceptable?

The overall_state method defines whether a StagingProject can be merged or not. The following conditions should be met to make a StagingProject acceptable, aka. mergable:

  • if it is not empty
  • if there are no untracked requests or obsolete requests (requests in state 'declined', 'superseded' or 'revoked')
  • if there are no unfinished builds for any StagedRequest of a StagingProject
  • if there are no open reviews for any StagedRequest of a StagingProject
  • if there are no open StatusChecks for any Repositories of a StagingProject

How to merge the project?

Merging a StagingProject means to accept all requests that are staged for this project. Once the requests have been accepted, they are unstaged from the project.

@staging_project.staged_requests.each do |staged_request|
   staged_request.request.reviews.accept # the by project review
   staged_request.request.accept....
   staged_request.destroy # Remove the relationship
end

StageRequest

StagedRequest, is a request which is assigned to a specific StagingProject

What is the meaning of "Ready"?

StageRequest is ready if it doesn't have any open reviews.¹

¹ The review by project on the StagingProject is ignored. See the question below.

What does it mean that a BsRequest has a Review.by_project for a StagingProject?

To tell people where the request is staged and to prevent this request to be merged into the main project.

What is the meaning of "In review"?

StageRequest is "In review" if it has at least one open review.¹

What is the meaning of "Obsolete"?

StageRequest is "Obsolete" because it is in the state: declined, superseded or revoked.

What is the meaning of "Delete"?

Shows if the BsRequest has a BsRequestActionDelete action for deleting a package

General questions

Why is there a problems lane for StagingProjects on the StagingWorkflow show page?

The idea is to show if there is any build problems, or status checks, blocking the merge of the StagingProject.

What does the percentage (in each state of a staging project) mean?

It shows how far the staging project is away from being mergeable.

Clone this wiki locally