Support count-based requiredStatusChecks #22186
Replies: 7 comments
-
Todo:
|
Beta Was this translation helpful? Give feedback.
-
Naming-wise I'd personally consider additionally allowing numeric values for In the case of bitbucket-server, the call required is actually already in place And, similar to the current approach, getBranchStatus looks like the ideal spot to handle this; where the green check is expanded to check for X succesful builds, instead of more than 0. |
Beta Was this translation helpful? Give feedback.
-
@jlsjonas I'm against reusing the same config option because of another use-case. Maybe i have a lot of status checks for a commit / pr, but only some of them are required. The required check are very slow and completing eg after next renovate run. If i only configure the number renovate would automerge and miss the required check. So i would recommend to have both options and combining them with |
Beta Was this translation helpful? Give feedback.
-
I'd prefer not to overload an option to accept different types of values - e.g. a count or a list of names. It's already a bit overloaded because we use the value
(a) we won't implement this for one platform only - it needs to be consistent Option 1: the minimum count is passed to Option 1 will result in duplicated logic in each platform. I think the logic better belongs in the application layer so option 2 is preferred. |
Beta Was this translation helpful? Give feedback.
-
@rarkins I think we should refactor the status check handling, so the platform code only return the needed information in a single type shared by all platforms and do check checks in worker code as you suggested. This way we can remove a lot of duplicated code currently shared on most platforms |
Beta Was this translation helpful? Give feedback.
-
Ah I see, in a case where you'd want let's say 10/20 minimum completed & successful already, but only 3 of them required by name? Didn't think of that use-case :) Do note named-checks are (as far as I can tell) not actually implemented yet
Of course, I mainly gave it as an indication as I recognized the call; I suspect some (or most?) other systems will also have this info available already, or with a minor change |
Beta Was this translation helpful? Give feedback.
-
requiredStatusCount perhaps?
The information can be gathered from at least Github, Bitbucket & Bitbucket server
I'd propose an object containing a list of failed, in progress and successful buildnames, or (similar to this map on GH's status check) just a list of objects. |
Beta Was this translation helpful? Give feedback.
-
What would you like Renovate to be able to do?
As we have a plethora of tests, but some (due to agent restrictions) only trigger after the first set is completed, we get a race-condition when using
not-pending
on it's own, combined with branching-based automerge.Describe the solution you'd like
Allow passing a number to
requiredStatusChecks
(or alternative introduce a similar parameter accepting numbers) that will allow automerging when the defined number of tests are succeeded.Describe alternatives you've considered
Listing all test ids as
requiredStatusChecks
is eventually intended is not implemented yet.This would also be a good approuch, but I believe several projects would benefit from the simpler count-based approach.
Additional context
Bitbucket server (/stash) provides a "Minimum successful builds" merge check, which already does the job for PRs, however, due to other requirements for PRs (think reviewers, etc) we opted to do patch & pin automerges using branching; which avoids the merge checks.
Using the number-based approach also ensures more consistency between how PRs are checked & how automerges are checked
Beta Was this translation helpful? Give feedback.
All reactions