Repository navigation
Conversation
`cluster_pki_dir`, `cluster_secret`, and `cluster_pub_fingerprint` are declared as `str` in VALID_OPTS but default to `None` in DEFAULT_MASTER_OPTS. Widen each to `(type(None), str)` so the declared type matches the real default and strict-type validators stop flagging the mismatch. User-set string values remain valid.
3 tasks done
Contributor
Author
|
Superseded by #70755 which combines all five cluster-correctness backports into a single PR. |
This branch was previously deployed
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
Found during a doc-correctness audit of the master-topology work.
salt/config/__init__.pydeclares three cluster opts as barestrinVALID_OPTSbut defaults all three toNoneinDEFAULT_MASTER_OPTS. Every reader already treatsNoneand""identically (opts.get(...)truthy checks,(x or "")guards), so the mismatch is cosmetic — but_validate_optslogs a warning for each at master startup becauseisinstance(None, str)isFalse.Fix: widen the three entries to
(type(None), str). Matches the real default, preservesstras the valid user-set value, and silences the startup noise.Test plan
pytest tests/pytests/unit/config/— 171 passed, 2 skippedNonefrom""and no test pins the current (barestr) declaration