Repository navigation
fix(fleet): queue-domain --version rejects trailing arguments (#5603) - #5605
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 33 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d49761948
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #[test] | ||
| fn queue_domain_version_rejects_trailing_arguments() { |
There was a problem hiding this comment.
Gate the queue-specific test on the queue feature
For the supported serve and connect feature sets, which do not enable queue, this unconditional test fails: Surface::new excludes Capability::Queue, so run_domain correctly takes the capability-stub path and returns EXIT_UNAVAILABLE (69), rather than the asserted EXIT_USAGE (2). The bare-version assertion also expects success despite that capability being unavailable. Gate this test with #[cfg(feature = "queue")] or assert the appropriate stub behavior when the feature is disabled.
Useful? React with 👍 / 👎.
Fixes #5603.
The queue domain's
--versionshortcut inrun_domain(pkgs/fleet/crates/fleet/src/main.rs) checked onlyargs.first()and returnedEXIT_OKfor any trailing arguments — the one fleet version surface the #5572 (root built-ins) and #5592 (queue client verbs) arity fixes missed, because it intercepts the invocation beforefleet_queue::client::runis reached. It is also therepo-queueargv0 alias's only version surface.run_root'sreject_extra_argsbehavior.queue_domain_version_rejects_trailing_argumentsalongsideroot_builtins_reject_trailing_arguments:--version/-Vwith--bogus→EXIT_USAGE; bare forms →EXIT_OK.Verification (laptop, this branch):
cargo test -p fleet— 5 passed, including the new test.fleet queue --version junkextra→ exit 2 naming the argument;fleet queue -V --bogus→ exit 2;repo-queue --version junk(argv0) → exit 2; barefleet queue --versionandrepo-queue --version→ exit 0 with the version string.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.