Skip to content

Refactor the environment build and introduce testing to this tool.

Sergi Blanch Torné requested to merge sergi/ci-uprev:project_review into main

This tool started as a script, and as such, it grew. However, after some subcommands extend their features, it shows the monolithic setup of the environment forces us to define things that are not necessary. Therefore, it is time to look back and see which changes are required to help this tool to continue its growth.

First, it has been transformed into a Python module and uses Setuptools to manage it. With it, some changes are also necessary to maintain the flush of the prints to the Gitlab job's output.

The packages in the virtual environment have received an update.

The core part of this merge request is the transformation of a method to set up all the environments that defines the tool's behavior to a set of Singleton objects that, when necessary, will build the required information or provide, like a cache, what was already created.

It also includes a bug fix on the user experience when the tool doesn't know how to update the expectations from a job. It will now place a specific tag on the report made in the note of the merge request. So this will reduce the annoying review to know if the merge request includes it.

Finally, as this is a CI tool, it must have testing. A new job, especially for the pre-merge, is meant to review the expected situations that happen with real uprevs. So we should extend it with them, but also and especially the corner cases that we will solve in the future. The pre-merge will not require executing real pipelines (but it is possible). This change is fundamental because it happened that a merge request couldn't be merged because of a new and independent bug that occurred with the real uprevs.

Edited by Sergi Blanch Torné

Merge request reports

Loading