Skip to content

Conversation

@kpcyrd
Copy link
Owner

@kpcyrd kpcyrd commented Nov 29, 2025

This patch contains a bunch of minor bugfixes in rebuildctl (mostly related to #184), but also some small improvements.

  • fbb6507 Rename outdated suite argument to component in rebuildctl queue push
  • 81e7552 Fix endpoint url for build logs
  • 9cec2eb Add debug logging for sent http requests 9cec2eb
  • c22554b Remove duplicate code around request authentication
  • 372f29a Fix pkgs ls output by padding status text again
  • a7895e6 Make rebuildctl queue ls print actual queue order
  • 3dd4616 Make rebuildctl queue ls show due items only (unless --planned is set)
  • 7bafd67 Make rebuildctl queue ls --head more robust
  • 6203bbc Simplify/optimize rebuildctl queue ls formatting code
  • d60adbb Fix integration tests not working on aarch64 (example queue items doesn't match worker that doesn't advertise x86_64 build capabilities)
  • 8a2ee42 Add more queue operations to integration test

Copy link

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 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 suite argument to component in rebuildctl queue push for 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 --planned flag to show all)
  • Refactored status enum methods from Display trait to explicit as_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.

@kpcyrd kpcyrd merged commit 4aa510f into main Nov 29, 2025
22 checks passed
@kpcyrd kpcyrd deleted the rebuildctl-fixes branch November 29, 2025 19:05
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.

2 participants