Scaled Maintenance

Alright guys, here is a (maybe) super weird idea!

Imagine you have this one code change and you need to roll it out to 10 projects.
Workflow:

Checkout Project, do changes, test, mr, wait for approval, deploy

Checkout Project, do changes, test, mr, wait for approval, deploy

Checkout Project, do changes, test, mr, wait for approval, deploy

Checkout Project, do changes, test, mr, wait for approval, deploy

And so on...

So now, for example, there is the change that you want to remove the line with deprecated_feature in all values.yaml files.
In Bash, it would look like this:

find . -type f -name "values.yaml" | while IFS= read -r file; do
    # Remove the line containing 'deprecated_feature' and save the changes
    sed -i '/deprecated_feature/d' "$file"
    echo "Removed 'deprecated_feature' line from $file"
done

Now you could go into every Project execute the script and be done therefore "do changes" is faster, still have to Checkout Project, test, mr, wait for approval, deploy hmm...
Then maybe you could do it through a pipeline:

# .gitlab-ci.yml

stages:
  - apply_changes

apply_changes:
  stage: apply_changes
  script:
    - for project in <project_1_repo_url> <project_2_repo_url> <project_3_repo_url>; do
        # Clone project repository
        git clone $project project_repo
  
        # Navigate to project repository directory
        cd project_repo
        git checkout -b my_automatic_change

        find . -type f -name "values.yaml" | while IFS= read -r file; do
          # Remove the line containing 'deprecated_feature' and save the changes
          sed -i '/deprecated_feature/d' "$file"
          echo "Removed 'deprecated_feature' line from $file"
        done

        # Push changes to project repository
        git push origin my_automatic_change
  
        # Create MR
        sh createMr.sh
      done

Coolio, so now only test (tbh still checkout), wait for approval, deploy remains.

But now the crazy idea!
Above Bash Script is created, as you can imagine, with ChatGPT.
So why not build a pipeline that can be given a list of instructions and it prepares them "smartly".
Something like:

  1. Upgrade the package MyPackage to Version 42.
  2. In every Startup.cs, add the parameter typeof(MyAwesomeJobParameters) to services.addJobParameters.
  3. In the Configure method in Startup.cs, add the line services.AddMyAwesomeJob();

Now the Pipeline could call a Generative AI with the instruction list in each projects context and let it generate the changes, create the MR. All the Dev would have to do is review the changes and maybe test the execution, if unit tests are not sufficient.

The whole thing sounds like a fantasy, but I guess it's not anymore.
If one would implement this, there would be a whole lot of potential pitfalls, trust issues and so on, but I think for this specific scenario it would enable Devs to less busy work and focus more on bringing cool features to the customers.