Skip to content

Refactor the ComponentVersions update methods

Robert Speicher requested to merge rs-refactor-component-versions into master

This is a minor refactoring of PassingBuild and ComponentVersions as a stepping stone for https://gitlab.com/gitlab-org/release-tools/issues/389.

I recommend viewing commits individually, as the first is simply reordering methods so that Omnibus methods are grouped, and CNG methods are grouped, but it results in a lot of scary-looking diffs.

c520c363 - Reorder methods in ComponentVersions

Groups Omnibus and CNG methods together, moves shared methods to the top. This more clearly shows that this class is doing (at least) two different things.

475c7cd6 - Refactor the ComponentVersions update methods

Previously the PassingBuild class would ask this class if it had changes, and then if it did, told it to update, rendering a log message with the ensuing commit.

Now, we just tell it to update. If it doesn't have changes, it does nothing. If it has changes, it performs the commit (outside of dry-runs) and logs the commit URL.

fade77eb - Update PassingBuild for new ComponentVersions update methods

Now this class has slightly less responsibility, and it can just fire-and-forget the updates. It still has to (potentially) tag Omnibus itself, but that's for a future refactoring.

Edited by Robert Speicher

Merge request reports