Renovate¶
Overview¶
To keep all the areas up to date with other areas we use a automated bot called the Renovate Bot. It runs weekly and go through all areas and make PRs to those repositories that do not have the latest nuget packages of other areas.
Important properties of the renovate bot:
- The Renovate bot will not update non-majority packages (like Dapper or Polly), they will have to be updated manually.
- The Renovate bot will give up in case older renovate PRs to the same repo exists. Make sure to merge (or fix if broken) any renovate PRs as quickly as possible.
Trigger Renovate job for specific repo¶
Sometimes its useful to force run the renovate job on a specific repository that you want to get latest nugets. This is easy to do:
- Open the git repo in Github, go to the issues list and open the "Dependency Dashboard" issue.
- From this issue you can (by checking the checkboxes) either tell renovate to create/update the renovate PR, or to refresh what updates are available. Example here: majority-dev/be-transactions#733
Manually fix renovate PRs¶
Sometimes a PR created by the Renovate bot fails, for example because the new nuget is not completely backwards compatible and requires code changes. In this case you will need to do a manual fix.
There are in general two ways to handle this, either make a fix directly on the renovate PR, or do a complete manual update as a normal PR like other feature developments.
To update the Renovate PR, follow these steps
- Fetch changes
git fetch - Checkout the branch
git switch renovate/platform - Do any changes as you normally would and commit them.
git add ..andgit commit ..(The renovate jira ticket can be reused: MIB-6168 for commit msg) - Push the changes to the upstream
git push - Done! The PR will now retrigger with the changes done
Troubleshooting¶
Renovate might get stuck for various resons. These things can help:
- Close any open Renovate PR.
- Delete the renovate branch (for backend areas its called
renovate/backend). - Doblecheck that the renovate config file exsists and are correct (
renovate.jsonin the root of the repo) - Retrigger Renovate by clicking the checkboxes in the Dependency Dashboard issue
- Check the renovate log (renovate runs in stage, and its logs can be viewed in argocd https://stage-argocd.minority.com/applications/renovate)