useBaseBranchConfig and extends #36454
Unanswered
volker-raschek
asked this question in
Request Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
GitHub
Please tell us more about your question or problem
Hello everyone,
long-term goal is to establish renovate in the company and to provide a global config via renovate presets for several branches. Below is a rough description of the setup and also a supposed problem, which hopefully will not be confirmed and if so, I would need your support or suggestions.
Setup
We have a GitHub organization. There are several git repositories in the organization. The git repositories contain the source code of a monolithic application, which is built from its components. The names of the branches of the git repositories are standardized. For example
v1.x,v2.xor(main|master).There is a renovate config in each of the git repositories. Renovate preset configs are loaded there via
extends. The presets are located in the git repository namedrenovate-config, which is also subject to the standardized branch name. Depending on which release stream you are in, the path inextendscontains a different branch of therenovate-configrepository. The following is an example of the release streamv3.x, which corresponds to themasterormainbranch.{ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "baseBranches": [ "/^(main|master)/i", "/^[12]\\.x/i" ], "extends": [ "github>my-org/renovate-config:default#master", "github>my-org/renovate-config:disable#master", "github>my-org/renovate-config:container#master", "github>my-org/renovate-config:github-actions#master", "github>my-org/renovate-config:maven#master", "github>my-org/renovate-config:regexp#master", "github>my-org/renovate-config:grouping#master" ], "useBaseBranchConfig": "merge" }To ensure that the other release streams
v1.xandv2.xalso receive updates, the renovate configmust be loaded from the respective branches. To do this, we use
useBaseBranchConfig: mergein combination withmatchBaseBranches. The following is an excerpt of the renovate-config of a project with the release streamv2.x.{ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "baseBranches": [ "/^(main|master)/i", "/^[12]\\.x/i" ], "extends": [ "github>my-org/renovate-config:default#2.x", "github>my-org/renovate-config:disable#2.x", "github>my-org/renovate-config:container#2. x", "github>my-org/renovate-config:github-actions#2.x", "github>my-org/renovate-config:maven#2.x", "github>my-org/renovate-config:regexp#2.x", "github>my-org/renovate-config:grouping#2.x" ], "useBaseBranchConfig": "merge" }Problem
The documentation regarding
useBaseBranchConfig: mergeis a bit unclear. I suspect that the items inextendsare not merged, but that they are overwritten. This would lead to the problem that depending on how renovate applies the rules (last-win strategy?), the presets of the last branch are applied. In case of the example above viav2.x.This would lead than to an issue, because the other branches will than not receive anymore updates.
Have I analyzed the situation correctly or is renovate behaving differently than expected?
If the concept is not feasible, what would be the approach of the renovate developers to manage / maintain multiple branches with their own preset configuration?
Volker
Logs (if relevant)
No response
Beta Was this translation helpful? Give feedback.
All reactions