minimumReleaseAge-passed PRs get rewritten in place once a newer release also clears MRA #45062
Replies: 2 comments 5 replies
|
Hi there, Please help this Discussion progress by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. Discussions without reproductions are less likely to be converted to Issues. Please follow these steps:
If you need help with running Renovate on your minimal reproduction repository, please refer to our Running Renovate guide. The Renovate team |
Are you only seeing this for major versions, or across different version types? Trying to work out the functionality you're wanting,t oo |
Uh oh!
There was an error while loading. Please reload this page.
How are you running Renovate?
A Mend.io-hosted app
Which platform you running Renovate on?
GitHub.com
Which version of Renovate are you using?
43.259.2
Please tell us more about your question or problem
Follow-up to #45037, moved here per @jamietanna's suggestion.
Summary:
minimumReleaseAgeitself works correctly. A release is only ever selected once it has genuinely cleared its own age window. The gap is that Renovate has no concept of a PR being pinned to the specific release that first graduated; once a later release also clears MRA, the existing branch gets rewritten onto it, discarding the fact that an earlier, already-qualified release was sitting there mergeable.Where this happens (traced in source, not just observed):
filterInternalChecks()inlib/workers/repository/process/lookup/filter-checks.ts: on every run, for a given (dependency, update-bucket), it picks the newest release that currently passesminimumReleaseAge. Correct in isolation.lib/workers/repository/update/branch/index.ts:567-578: the only thing stopping that newly-selected candidate from overwriting an existing open branch isrebaseWhen: "never". Without it (the default), the branch converges to whatever the latest run picked.So in practice: PR opens for
v1oncev1clears MRA. Later,v2is published and also clears its own MRA window on a subsequent run. The same PR gets rewritten fromv1tov2in place, rather thanv1's PR staying untouched and a separate PR opening forv2.Our config, for reference:
Workaround today:
rebaseWhen: "never", which serializes updates into a queue-of-one — stops the rewrite, but also blocks legitimate rebases we'd otherwise want (conflict resolution, etc.).Ask:
Is there an option to add a mode where each release that clears
minimumReleaseAgegets (or keeps) its own PR, instead of the update-bucket always converging onto a single branch tracking the latest passing candidate? Or am I just doing something wrong?If a proper feature request/Issue is a better fit than a Discussion for this, happy to move it there.
Logs (if relevant)
Unfortunately I couldn't find the logs back since I've been using a workaround for longer then the logs have been saved. If it is genuinely useful for this feature request / ask I will reproduce it.
All reactions