fix(config): warn on legacy restart drain setting - #70435
Open
hoddukzoa12 wants to merge 1 commit into
Open
Conversation
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.
What does this PR do?
hermes config checknow warns when the persisted config explicitly contains numericagent.restart_drain_timeout: 180.That value matches the former default changed to
0by #54066 after long drain windows were found to interfere with supervised gateway restarts. Existing config files can still retain the old explicit value, so merging with the current defaults does not help those installations.The warning is advisory and read-only. It reports the current default and gives the exact remediation command:
It does not rewrite user config because an explicit value may be intentional.
This is intentionally separate from launchd recovery work such as #68238 and #43181: those PRs recover a failed restart, while this change only detects a persisted legacy default during
hermes config check.Related Issue
Follow-up to #31981 and PR #54066. No new issue was filed for this small, self-contained follow-up.
Type of Change
Changes Made
hermes_cli/config.py180hermes config checktests/hermes_cli/test_config.py1800, another positive value, quoted string, boolean, or nullconfig.yamlremains unchangedHow to Test
Result:
309 passed, 0 failed.A broader restart-related regression selection also passed:
Additional checks:
All passed.
Manual smoke with isolated
HERMES_HOMEvalues confirmed:The config hashes were unchanged after both checks.
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — N/A; no public option or workflow changedcli-config.yaml.exampleif I added/changed config keys — N/A; no config key or default changedCONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AScreenshots / Logs
Not applicable; CLI output and verification are included above.