Skip to content

Adjust exception handling for post-deploy prepare class

Mayra Cabrera requested to merge catch-prepare-post-deploy-exception into master

What does this MR do and why?

PostDeployMigrations::Prepare class raises an exception when no pending post-migrations are available or when the production checks fail. The exception is not useful:

  • Release managers can't take any action from it, in most of the cases, they'll need to wait for a resolution.
  • We don't raise exceptions on auto-deploy operations when production checks fail. We just notify release managers about it.

This commit updates the way the Prepare classes handles exception by:

  • Sending a message when there are no pending post-migrations
  • Catching the exception when there are no pending post-migrations and when production health checks fail
  • Canceling the post-deploy pipeline when there are no post-migrations or the production checks fail

As part of gitlab-com/gl-infra/delivery#2441 (closed)

Author Check-list

  • [-] Has documentation been updated?
Edited by Mayra Cabrera

Merge request reports