[code sync] Merge code from sonic-net/sonic-utilities:202605 to 202606 - #462
Merged
Merged
Conversation
mssonicbld
commented
Sep 15, 2026
Collaborator
…mport register_dynamic_commands() runs at import time and calls ConfigDBConnector().connect(). The bash-completion generator imports every CLI module in a redis-less build container to emit the completion scripts; the counterpoll import raises there, so no /etc/bash_completion.d/counterpoll file is generated and "counterpoll <Tab>" does not complete on the switch, while config/show complete fine. Catch the RuntimeError swsscommon raises when CONFIG_DB is unreachable, log a warning, and skip the DPU-only dynamic commands instead of failing the import; unrelated errors still propagate. Completion is dynamic, so on a DPU with CONFIG_DB up the eni/ha_set commands are still registered and still complete. Add regression tests for both the swallowed RuntimeError and the propagated unexpected error. Signed-off-by: Yizhen Zhang <evazha@nvidia.com>
…2605 [202605][counterpoll] Fix bash tab-completion by not requiring CONFIG_DB at import
Collaborator
Author
|
/azp run |
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.