-
-
Notifications
You must be signed in to change notification settings - Fork 32
Fixes and improvements for rebuildctl {pkgs,queue} #209
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
Conversation
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.
Pull request overview
This PR delivers a comprehensive set of bugfixes and improvements to the rebuildctl command-line tool, particularly focused on queue management functionality. The changes address issue #184 by fixing argument naming inconsistencies, correcting API endpoint URLs, improving queue display logic, and adding better observability through debug logging.
Key Changes:
- Renamed the
suiteargument tocomponentinrebuildctl queue pushfor consistency with the codebase terminology - Fixed the build log endpoint URL (was incorrectly pointing to packages API instead of builds API)
- Enhanced queue listing to show items in actual priority order and filter out non-due items by default (with
--plannedflag to show all) - Refactored status enum methods from
Displaytrait to explicitas_str()methods for more efficient string conversion - Added comprehensive debug logging for HTTP requests and queue operations
- Fixed integration tests to work reliably on aarch64 systems by hardcoding x86_64 architecture
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/src/main.rs | Removed unused Cow import; improved queue listing with proper pagination, filtering, and output limits; renamed suite to component parameter |
| tools/src/fancy.rs | Added padding to status strings for consistent alignment in output |
| tools/src/args.rs | Renamed suite to component argument; added --planned flag for queue listing |
| tests/src/main.rs | Extracted request_work() helper; added comprehensive queue operation tests; fixed typo ("bacK" → "back"); hardcoded x86_64 architecture for reliability |
| daemon/src/api/v1/queue.rs | Added priority field to queue queries; implemented proper queue ordering (priority, date, random); added debug logging; refactored error handling to use let-else pattern |
| daemon/src/api/v1/build.rs | Changed from to_string() to as_str() for BuildStatus and ArtifactStatus conversion |
| common/src/api/v1/models/queue.rs | Added is_due() and running_since() helper methods; added priority field to QueuedJob |
| common/src/api/v1/models/build.rs | Refactored BuildStatus and ArtifactStatus from Display trait to explicit as_str() method |
| common/src/api/v1/mod.rs | Fixed build log endpoint from incorrect api/v1/packages/source/{id} to correct api/v1/builds/{id}/log |
| common/src/api/mod.rs | Extracted duplicate authentication logic into authenticated() method; added debug logging for all HTTP requests (GET, POST, DELETE) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This patch contains a bunch of minor bugfixes in rebuildctl (mostly related to #184), but also some small improvements.
suiteargument tocomponentinrebuildctl queue pushpkgs lsoutput by padding status text againrebuildctl queue lsprint actual queue orderrebuildctl queue lsshow due items only (unless --planned is set)rebuildctl queue ls --headmore robustrebuildctl queue lsformatting code