-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Major release backwards compatibility for hosted users #19980
Comments
This is probably not solvable without some statefulnes but sounds interesting. I don't need that behavior, as i always want latest behavior. 🙃 |
WDYT about adding a major/schema version tag to That way we know from which level to migrate and we can offer upgrades to the current version with the old behaviour Basically there would be then a preset to opt in this config upgrades and the So the workflow would be V34 {
"version": "v34",
"presets": [
"keepBehaviorOnMajorUpgrade"
],
"SomeConfig": "ValueToBeMigrated",
} PullRequest {
"version": "v35",
"presets": [
"keepBehaviorOnMajorUpgrade"
],
"SomeConfig": "MigratedValue",
} If there is no |
@secustor I like this idea too. One challenge would be knowing whether to do it at the repo level or upgrade a shared preset instead |
I would simply make this two different presets and each would be separately evaluated. |
We also want a way of migrating the existing user base, e.g. we assume that no version means v34 (or whenever it is we eventually start supporting this) |
How a about yet another preset So everybody which uses our default values will be opted-in everybody with customisation will keep the same behaviour as before. The second batch of users have to check changelogs anyway as we introduce breaking changes and can then decide to opt-in. |
We still need a way to indicate this to the end user in repo (e.g. for the hosted app) |
Are you referring to this?
I would add this as additional Note on the PR which initially adds the version to |
Something I still think is undecided is whether PRs targeting We could make Renovate always embed its current major version into a field like This leaves existing users with no Another potential problem is people being confused about which version is run. e.g. they have |
I like the idea of having a
We need to think about legacy users - at which point, and how do they start having a compatibility field in their config? Also for users which would like to centrally control their compatibility, how do we do that? I'm thinking that compatibility could be set:
Consider the hosted app. We could add a WARN to each repo which has no compatibility setting, only if there are backwards compatibility settings. e.g. if v36 has no legacy presets then no need to bother people. People could remove the WARN by either:
We could also support the concept of compatibility=* which means "don't bother me, just give me the latest always". |
Preventing mode confusion
We should tell our users in the Dependency Dashboard and in Renovate's own pull requests:
Related issuesWe're thinking of adding a Should we work on getting automatic config migrations going first? That way we can automatically update the |
It occurred to me that this is a similar concept to the Go mod directive in some ways. A colleague also alerted me to this concept in Ruby: https://www.fastruby.io/blog/rails/what-does-load-defaults-do.html |
While building this I've realized there's an important point to make: this backwards-compatibility should be about repository config options (such as branch names), and not global/admin options (such as autodiscover). For self-hosted global/admin options, our usual approach of documenting changes in major release notes works fine. |
Design decisions so far:
Still to do:
|
An integer is fine. The config option name is more important than the version number in the config itself.
Warn as often as we can. So in each PR and the Dependency Dashboard issue. I don't know if you can warn in the Mend dashboard? If possible, I'd like us to link to the source file of the configuration. So that users can see where the behavior is coming from. Mockup time for the warning in the PR and Dashboard: ### Renovate compatibility version
Renovate's `renovateCompatibility` is set to `38`. The source of this setting is in: [link to source file](). Read the [`renovateCompatibility` docs]() to learn more.
How about creating a page similar to the Renovate docs, Release notes for major versions of Renovate, but for
Upgrade always. Skipping versions seems more confusing to me. The special
Yes, because then:
The config migration for Splitting things into different config migration PRs can be confusing: "Which PR is for what thing?", "Why are these PRs split into two, they both change my config, so why not have a single PR.". |
What would you like Renovate to be able to do?
Provide a way to make backwards-incompatible ("breaking") changes to Renovation functionality but maintain old behavior for existing orgs and/or repos.
For example if Renovate switches from enabling or disabling a feature to the opposite - even if it's a good idea - it ideally should have the capability to maintain existing behavior for existing users.
If you have any ideas on how this should be implemented, please tell us here.
First of all, this setting should ideally be controllable per-org or per-repo. Per-org would mean that even new repos within the same org would keep the "old" behavior. If it's per-repo, it means that only existing repos would keep the old behavior any time there's a change.
There would also need to be the option for individual repos to either:
One way I'm thinking of implementing this is that we introduce a new category of preset, e.g.
legacy:*
. If any legacy presets are included, a note should be made in the Dependency Dashboard. The idea is that repos or orgs should:So then when we have a major upgrade, there could be a legacy preset most times, e.g.
legacy:v35
. This preset would be a wrapper around 1 or morelegacy:*
presets, and then each would then contain the actual config to revert default behavior (e.g.prHourlyLimit: 0
).Ideally the Renovate administrator could have granular control over this too. e.g. they can read the release notes, decided that non-zero PR limits are a good thing, and not include the legacy presets for it when upgrading to v35.
The next challenge is statefulness, i.e. renovate knowing which repos to keep backwards behavior and which are new. This could be done via either:
Is this a feature you are interested in implementing yourself?
Maybe
The text was updated successfully, but these errors were encountered: