Repository navigation
fix(fleet-config): reject blank scalar config values at load (#6405) - #8550
Merged
Merged
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 41 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 Summary: ✅ CompletedThis 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #6405: blank (empty or whitespace-only) scalar config-file strings in
fleet-configare now a loud load error, matching the crate's zero rule (#6412) and its stated policy that a malformed file is a loud error, never a silent fallback.Config::validatenow rejects a blank value for[proxy] broker_socket,[proxy] target_host,[proxy] connect_udp_listen,[secrets] token_file,[dispatch] url, and[dispatch] token_namewith a field-namingConfigError::Parseat load ("must not be empty or blank; omit the field for the default"). The configured value is never echoed in the error.broker_socket = ""resolved to the home directory itself,token_file = ""likewise, andurl = ""surfaced as a configuredSome("")— each now fails at load instead.[[proxy.services]]row rules (fleet-config: [[proxy.services]] is never validated — duplicate ports silently collapse last-wins in the broker's routing map, and port 0 / empty names load #6397) and nonblank/default resolution.Tests
blank_scalar_strings_are_a_loud_error: both the empty and whitespace spellings of all six fields fail at load with the field named (oracle: the Parse message contains the field name); a fully-populated valid control surfaces every value unchanged; an empty file keeps every documented default.cargo test -p fleet-config: 45 passed, 0 failed.cargo fmt -p fleet-configclean.Queue: task 14872, lane code-a.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.