Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Implement a max_retries option#196

Merged
kpcyrd merged 6 commits into
kpcyrd:mainfrom
Nihlus:max-retries
Jan 8, 2026
Merged

Implement a max_retries option#196
kpcyrd merged 6 commits into
kpcyrd:mainfrom
Nihlus:max-retries

Conversation

@Nihlus
Copy link
Copy Markdown
Contributor

@Nihlus Nihlus commented Nov 1, 2025

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.

Comment thread daemon/src/api/v1/package.rs Outdated
@jspricke
Copy link
Copy Markdown
Contributor

This is deployed on reproduce.debian.net but does not seem to work. I just saw on arch:all haskell-config-schema being built and afterwards queued again even though it has been tried 23 times already.

@Nihlus Nihlus force-pushed the max-retries branch 2 times, most recently from 990f61e to 0f5e9ca Compare November 27, 2025 17:44
@h01ger
Copy link
Copy Markdown
Contributor

h01ger commented Jan 7, 2026

hey, i've just tried to cherry-pick these 3 commits on the latest main branch, and while 0f5e9ca and a6a3b69 merge nicely, f1bc6b5 has a conflict though I suppose it's harmless.

@h01ger
Copy link
Copy Markdown
Contributor

h01ger commented Jan 7, 2026

yup, it's trivial. please fixup and rebase :)

@Nihlus
Copy link
Copy Markdown
Contributor Author

Nihlus commented Jan 7, 2026

Let me see about cleaning that up.

Nihlus and others added 3 commits January 7, 2026 21:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_retries configuration option to ScheduleConfig
  • 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.

Comment thread daemon/src/api/v1/build.rs Outdated
) -> QueryResult<()> {
let friends = get_build_input_friends(connection, id)?;

// null out the next retry to mark the package and its friends as non-retried
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "non-retried" but should say "non-retriable" or "not retriable" to match the function name and be grammatically correct.

Suggested change
// 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

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really have an opinion on this.

Comment thread daemon/src/api/v1/util/friends.rs
Comment thread daemon/src/api/v1/build.rs Outdated
@kpcyrd kpcyrd merged commit 1614f53 into kpcyrd:main Jan 8, 2026
10 checks passed
@Nihlus Nihlus deleted the max-retries branch January 8, 2026 17:49
@kpcyrd
Copy link
Copy Markdown
Owner

kpcyrd commented Jan 8, 2026

Thank you! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants