Skip to content

Refactor Rollback::CompareService arguments

Reuben Pereira requested to merge rp/refactor-rollback-compare into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Rollback::CompareService currently takes two parameters: current and target. Both parameters can either contain a package version (14.3.202109151120-97529725116.5a421e7fb6d) or an environment (gstg).

This MR refactors Rollback::CompareService to accept another parameter called environment. This allows us to reserve the current and target parameters only for package version strings.

Rollback::CompareService can currently be called like Rollback::CompareService.new(current: 'gstg-cny', target: 'gstg').execute. This will check if the current package on gstg-cny can be rolled back to the previous package on gstg. With this MR, we will not be able to check rollback eligibility across environments in this way. This ability of Rollback::CompareService is not being used anywhere currently, and we can always add it back if required.

gitlab-com/gl-infra/delivery#2539 (closed)

Author Check-list

  • Has documentation been updated?
Edited by Reuben Pereira

Merge request reports