-
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
feat(gitlab): add branch status check attemps #32692
base: main
Are you sure you want to change the base?
feat(gitlab): add branch status check attemps #32692
Conversation
…om 10 to 2 to avoid overly penalizing branches without pipelines
Co-authored-by: Rhys Arkins <[email protected]>
Could this instead be default functionality, with a large number of attempts, e.g. 10? |
const delay = 1000; | ||
const retry = 5; | ||
process.env.RENOVATE_X_GITLAB_BRANCH_STATUS_CHECK_ATTEMPTS = | ||
String(retry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String(retry); | |
`${retry}`; |
use string template or toString
method
delete it in beforeEach
to not influence other tests
2, | ||
); | ||
|
||
for (let attempt = 1; attempt <= retryTimes; attempt += 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the whole loop should have a try catch and early return on failures from gitlab API
This will penalize projects that do not have defined pipelines, this will systematically wait 10s and slow down the renovate analyzes |
Thanks for the info. I think I missed this from the various conversations before. Could make sure this info of when this is setting is applicable and when it's not is captured in the markdown doc in this PR? I will then decide if it needs to be a first-class option or brainstorm if we have a clever way to detect this. If this is a common problem we prefer that users don't need to set obscure experimental options. |
Changes
RENOVATE_X_GITLAB_BRANCH_STATUS_CHECK_ATTEMPS
.Context
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: