-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Allow multiple branch/PR limit groups #10546
Comments
Failing this, is there some way to run renovate once per manager (ie. a separate gradle run and npm run), without it autoclosing the existing PRs which don't match the enabled managers? |
According to our prConcurrentlimit docs you can only limit the amount of PRs open concurrently per repository:
Can you explain why you need this new feature? Why do you want to limit PRs per package manager, instead of having one global limit? In what way is the global limit not working for you? Maybe what you really want/need is a way to reduce the noisiness of Renovate updates, either by scheduling updates, grouping updates, or auto merging updates, or a combination of those strategies... Take a look at these guides: Do none of those strategies help with your problem? |
I found some issues that seem similar/related to your issue:
|
In your example you're expecting 5 for gradle plus 5 for npm, equaling 10 total? |
That's the way I read it as well. 😄
10 concurrents PRs total. But what do we do in case there are 3 package manager/files on the repo, and they only explicitly specified concurrent PR limits for |
To clarify, I would expect 10 total PRs - 5 for gradle, 5 for npm. In a project with a large number of dependencies where different parts of the codebase are maintained by different teams/collaborators (eg. a UI team looking after npm dependencies, a backend team looking after gradle dependencies), the renovate PRs can get swamped by one manager. I agree that more proactively merging in dependencies would resolve this, but in reality (especially UI dependencies) they require thorough testing before merging. So for example if there is a backlog of npm dependencies, we won't see and gradle PRs until all the existing ones have been actioned. Note that as a workaround I've found that by setting |
I think you should use dependency dashboard approval for your UI packages, so you can approve the number you like to handle. |
I like the Dependendy Dashboard approval, but this doesn't let you know if you have any updates which passes test and are easy merges. Maybe you just want Renovate to create PRs for all updates, not just a limited amount of them. If you extend from the {
"extends": [
":prHourlyLimit2",
":prConcurrentLimit20",
]
} https://docs.renovatebot.com/presets-config/#configbase But you can tell Renovate to create all PRs by setting the https://docs.renovatebot.com/configuration-options/#prconcurrentlimit Would this help your problem? |
The only real problem I've hit with a high limit is the number of rebases (and subsequent builds) after each merge + renovate run |
This only happens if you use auto merge or use |
I recommended to set the
This is a bad idea... 🙈
|
Following discussion #11969 and suggestion by @HonkingGoose and @rarkins I will comment here. The feature requested here will not solve our problem, but it could possibly be generalised. We would like to have the ability to specify limits per folder/package file. Specifically, we are looking into replicating
Answering questions from @rarkins:
We want to set the PR limit per subproject in monorepo. For us it is a folder which contains eg. package.json, gemfile, gradle.kts etc.) and make sure all projects are getting dependency checks and PRs (up to set limits).
We are using
How could we satisfy both? |
@gustaff-weldon in other words, you want these prLimits to operate independently of each other? One thing different about Renovate is that it allows very flexible grouping, meaning that we can't stop you defining some limits per path but then mixing them into shared PRs. Renovate also doesn't make you specify which folders to update or what type they are of course. We may need a new limit concept like "packageRules": [{
"matchPaths": [...],
"prLimitBucket": "fe",
"prConcurrentLimit": 3
}] This could also potentially support templating so that you could assign every separate package its own limit, e.g. "packageRules": [{
"matchPackagePatterns": ["*"],
"prLimitBucket": "{{parentDir}}",
"prConcurrentLimit": 3
}] @viceice @JamieMagee wdyt about this concept? |
Sounds good to me. |
Apart from this concept we'd also need to change our logic so that we calculate limits per branch and not at the start of "for branch of branches" like we do today. |
Yes. I need granularity, ideally on
I'm aware of that, I'm also aware you could have groups that will overlap, but I would not worry about this tbh, if you check number of PRs per group that would be enough.
I would be fine even with Anyhow, any direction you'd take to allow granularity on PRs will be a win for me :) Thanks for giving this a thought @rarkins! |
Revisiting this idea. Limits can be configured at top level, and they apply to all branches, like we originally intended. Limits can be defined in named groups and then applied, like so: {
"limitGroups": [{
"limitName": "development dependencies",
"prConcurrentLimit": 1
}],
"packageRules": [{
"matchManagers": ["npm"],
"matchDepTypes": ["devDependencies"],
"applyLimitGroups": ["development dependencies"]
}, {
"matchManagers": ["bundler"],
"matchDepTypes": ["test"],
"applyLimitGroups": ["development dependencies"]
}]
} Limit groups can be implicitly defined in packageRules: {
"packageRules": [{
"matchDepTypes": ["devDependencies", "dev"],
"prConcurrentLimit": 1
}]
} Questions remaining:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
We already have a prPriority field too |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
+1 |
We're also interested in this feature. We want to update our internal dependencies no matter what the limits for other dependencies are and no matter how many PRs are open. I guess @rarkins is waiting for input regarding these questions. I'll give you my thoughts as a start:
I'd say apply all of them with the most specific one taking precedence over the others. Given a configuration like this:
I'd expect that we have at most 5 open PRs of dependencies not matching the package rule with a potentially unlimited number of open PRs for matching dependencies. Whether the limitGroup should still count to the global limit of five, I'm not sure. For our use case, I would not care, but I guess things would really get messy if a config contained many limitGroups.
You mean overriding from a parent config? I think it should be possible to override the settings for a limitGroup or to change the limitGroup of a package. |
That to me sounds contradictory. Do you mean apply only the most specific instead of apply all of them? |
Sorry, I think there's a confusion here. I think "apply the most specific one" for each package is what I want. So in the above example a I'm not sure about how the limitGroups should interact with each other or with the global limits. Should a global prConcurrentLimit of 5 stop updates if there are 10 open PRs from a limitGroup without limits? Or should the global limit be a separate implicit limitGroup instead, so we'd always get up to five package updates plus unlimited That's what I was trying to say with this:
|
I'm thinking if we can start simple and solve the majority of cases:
So for example if we set a root level concurrent limit of 5, but no limit for |
Sounds like a good solution to me! 👍🏼 You mean internal packages though, I guess:
|
Additional requirement from @allanlewis in #24438:
|
This comment was marked as resolved.
This comment was marked as resolved.
I would really want this feature since it would be useful in the case if we only want any security update for release branch but all dependencies for main branch. This is currently not possible, but if we can set request rate limit per package rule, i could eventually set the limit for release branch to 0. and leave the security update for all branches. |
Security updates should bypass all rate limiting today already |
another +1 here we have very busy service devs at the moment who can't get to Renovate regularly to get rid of 'nuget' ones, so it keeps filling up and in order to get more front end 'npm' ones we keep having to bump up the minimum. we started at 5 and now we are at like 25 (which also means now we have a stupidly large set of nuget PRs open at once) just in order to keep getting npm PRs. when I first was looking through the docs I assumed I had to be stupid and just somehow missing where they said how to make different pr limits because it was so obviously a thing that should exist that it didn't even occur to me it wasn't in the docs somewhere if I looked harder |
@rarkins I forked the renovate repo, when my suggestions of honoring the priorities for creating new issues was rejected. I have implemented my idea and it is working great for my company for more than a year now. This feature might be the right thing long (or very long term), but it seems like in does not rise up in your priority list. The implementation of honoring the priorities took me 2-3 days. It might not be perfect, but it definitely seems to have better ROI. Maybe you could reconsider and I can contribute the change back to your repo? |
This comment was marked as spam.
This comment was marked as spam.
We don't currently have any customers needing this so it is not prioritized internally. PRs are welcome, alternatively there is an experienced (independent) consultant in Austria who you could pay for implementation. |
I think @secustor is the consultant you're referring to here? |
I'm interested! @rarkins |
@kamok please reach out to your customer success manager at Mend, or have your colleagues reach out. Usually customers have a prioritized list of feature requests and while there's no guarantees of new features, we do our best to get to the highest priority ones |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
Here's how I'd like it implemented. Hopefully I haven't forgotten any thing important.
|
Default limits will always be present ie, no scenario where value won't be logged.
This will be the case for any branch that has more than one update, because of the default value for each limit. |
I think you misunderstand something. The second statement is not correct. It's entirely possible for all updates in a branch to have been configured with the same limits |
What would you like Renovate to be able to do?
It would be great to be able to set a prConcurrentLimit per manager. It looks like there was a bit of discussion in renovatebot/config-help: renovatebot/config-help#563, which was closed without a solution.
eg. Ideally we could set a prConcurrentLimit like the following to allow up to 5 PRs each for both the
gradle
andnpm
manager.The text was updated successfully, but these errors were encountered: