Implement a max_retries option#196
Conversation
|
This is deployed on reproduce.debian.net but does not seem to work. I just saw on arch:all |
990f61e to
0f5e9ca
Compare
|
yup, it's trivial. please fixup and rebase :) |
|
Let me see about cleaning that up. |
This lets rebuilders set an upper limit for the number of times BAD packages will be retried.
There was a problem hiding this comment.
Pull request overview
This PR implements a max_retries configuration option that allows administrators to set an upper limit on the number of times unreproducible packages will be retried. Previously, BAD packages were retried indefinitely, consuming queue space and server resources. The implementation adds configuration support, queue filtering, and logic to mark packages as non-retriable when they exceed the retry limit.
- Adds
max_retriesconfiguration option toScheduleConfig - Implements queue filtering to exclude packages that have exceeded max_retries
- Adds logic to mark packages and their "friends" as non-retriable when retry limit is reached
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| common/src/config.rs | Adds max_retries field to ScheduleConfig with getter method |
| contrib/confs/rebuilderd.conf | Updates documentation to describe the new max_retries configuration option |
| daemon/src/api/v1/util/friends.rs | Adds mark_build_input_friends_as_non_retriable function and changes get_build_input_friends from async to sync |
| daemon/src/api/v1/queue.rs | Adds filtering to exclude jobs where retry count exceeds max_retries |
| daemon/src/api/v1/package.rs | Adds retry count checking in package submission to prevent queueing packages that exceeded retry limit |
| daemon/src/api/v1/build.rs | Adds retry count checking in rebuild report submission to mark packages as non-retriable when limit is reached |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ) -> QueryResult<()> { | ||
| let friends = get_build_input_friends(connection, id)?; | ||
|
|
||
| // null out the next retry to mark the package and its friends as non-retried |
There was a problem hiding this comment.
The comment says "non-retried" but should say "non-retriable" or "not retriable" to match the function name and be grammatically correct.
| // null out the next retry to mark the package and its friends as non-retried | |
| // null out the next retry to mark the package and its friends as non-retriable |
There was a problem hiding this comment.
I don't really have an opinion on this.
|
Thank you! ✨ |
This PR adds the ability for rebuilders set an upper limit for the number of times BAD packages will be retried.
Currently, bad packages are retried indefinitely, taking up queue space and valuable server time. In most cases, a BAD build will never become GOOD, and as such it's been an oft-requested feature to turn that indefinite retry off.
With these changes, administrators can configure the maximum number of allowed retries on packages in the configuration file. It does not presently distinguish between retries on BAD vs FAIL packages, but that is an enhancement we can make in the future.