Improve UI rollback check command
Current output of the /chatops run rollback check <environment> looks like this:
There are multiple improvement areas:
-
The message indicates the rollback is unsafe, but the reason for it is unclear. By taking a look at the output, I had assumed it was unsafe due to the migrations, but it was unsafe because there was an ongoing deployment to
gprd. If a rollback is deemed unsafe let's highlight the reason. -
Let's considered removing the regular migrations section. Regular migrations don't prevent rollbacks, as such they don't add any value to this context. This doesn't apply for post-deployment migrations, amount and specific details should be displayed for those.
-
Between the SHA's (
New,Current,Previous) and the packages, the output shows a lot of information. Additionally showing the package and the coordinated pipeline, as in the proposed solution, could make this output even more verbose. Perhaps we should consider a more succinct version.
Proposal
Let's make the rollback check command succinct by applying the above suggestions.
Final output:
| When a deployment is in progress | With post-migrations | When a deployment is in progress and there are post-migrations |
|---|---|---|
![]() |
![]() |
![]() |
| Link to Slack editor | Link to Slack Editor | Link to Slack editor |
Main differences with the current look:
- The reason behind a rollback deemed unsafe is in a specific section.
-
New,CurrentandPreviousreference to the package and not only to the SHA and they are links to the coordinated pipeline -
db/post_migrate/was removed from the post-migrations path, as it's redundant.
Implementation steps
-
Remove the migrations gitlab-org/release-tools!1595 (merged) -
Remove db/post_migrateprefix #2064 (closed) / gitlab-org/release-tools!1595 (merged) -
Consider running deployments on rollback check command - gitlab-org/release-tools!1596 (merged) -
Highlight the reason(s) that prevents the rollback - gitlab-org/release-tools!1599 (merged) -
Include the Newdeployment information if any.- This one should appear whenever there's a deployment in progress.
- It should include a
Compare to currentlink pointing to a compare link betweenNewandCurrent - It should include a
Compare to previouslink pointing to a compare link betweenNewandPrevious(in case we want to rollback more than one version).
-
Include the environment affected, when a rollback is unavailable it should state Rollback unavailable for gprdinstead ofRollback unavailable
Development log
- Rollback check command was moved to release-tools, as result the UI was updated #2080 (comment 720105406)
-
October 29th
- Merge request to remove the regular migration was submitted gitlab-org/release-tools!1595 (merged)
-
November 1st
- Running deployment check was removed from gitlab-com/chatops!261 (diffs), an MR was opened to re-introduced this check gitlab-org/release-tools!1596 (merged)
-
November 2nd
- It was noticed the
RollbackChecksclass doesn't have specs associated. MR opened to introduce them gitlab-org/release-tools!1598 (merged). We require those specs to extend the functionality.
- It was noticed the
-
November 3rd
- MR to remove the migrations block was merged gitlab-org/release-tools!1595 (merged)
- MR with specs for
RollbackCheckswas merged gitlab-org/release-tools!1598 (merged)
-
November 4th
- Running deployment check MR was merged gitlab-org/release-tools!1596 (merged)
-
November 5th
- An MR to highlight the reason why a rollback is not available was submitted gitlab-org/release-tools!1599 (merged)
-
November 8th
- gitlab-org/release-tools!1599 (merged) was merged



