Repository navigation
feat(ENG-15245): warn when deprecated option, env var and config names are used - #574
Merged
tigh-latte merged 5 commits intoNov 5, 2026
Conversation
…s are used Deprecate the old names of renamed settings for removal in 2.0.0 and print one shared stderr warning (once per run) naming the replacement: --api-proxy/CLOUDSMITH_API_PROXY/api_proxy, -S/--without-api-ssl-verify/ CLOUDSMITH_WITHOUT_API_SSL_VERIFY/api_ssl_verify, --org/--organization/ --oidc-org/--owner/-o/CLOUDSMITH_ORG/org/organization/oidc_org, --show-all, and the hidden proxy-suffix aliases. auth --token/--force/--json and login/token now use the same warning. Credential helper runtimes stay quiet.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Alias handling silently drops --show-all during list repos forwarding and can select the wrong Workspace when multiple deprecated flags are supplied.
5 open issues
Preserve canonical repo parameters during pagination forwarding · New Warn on deprecated config in inherited mcp start settings · New Honor command-line order among deprecated Workspace aliases · New Suppress stale alias warnings after profile overrides · New Warn about legacy SSL variable only when selected · New
What changed in this PR
Adds shared deprecation warnings to help CLI users migrate renamed settings before legacy aliases are removed in version 2.0.0.
Changes:
- Introduces hidden legacy options and shared stderr warnings, with credential-helper runtime suppression.
- Adds tests for alias behavior, precedence, warnings, and output handling.
- Updates documentation and workflows to use current setting names.
| File | Description |
|---|---|
| README.md | Documents deprecated settings and current replacements. |
| cloudsmith_cli/data/config.ini | Updates comments with alias removal plans. |
| cloudsmith_cli/cli/validators.py | Supports resolved pagination aliases during validation. |
| cloudsmith_cli/cli/tests/test_org_option.py | Updates the Workspace alias test description. |
| cloudsmith_cli/cli/tests/test_deprecation.py | Adds alias and warning regression coverage. |
| cloudsmith_cli/cli/tests/commands/test_auth.py | Tests shared warnings for deprecated auth flags. |
| cloudsmith_cli/cli/deprecation.py | Adds shared warning and alias-resolution helpers. |
| cloudsmith_cli/cli/decorators.py | Integrates alias resolution and deprecation warnings. |
| cloudsmith_cli/cli/config.py | Tracks deprecated configuration keys. |
| cloudsmith_cli/cli/commands/login.py | Uses shared warnings while preserving the login cutoff. |
| cloudsmith_cli/cli/commands/credential_helper/pnpm.py | Updates help text about deprecated aliases. |
| cloudsmith_cli/cli/commands/credential_helper/docker.py | Updates help text about deprecated aliases. |
| cloudsmith_cli/cli/commands/credential_helper/cargo.py | Updates help text about deprecated aliases. |
| cloudsmith_cli/cli/commands/auth.py | Uses shared warnings for legacy auth flags. |
| CHANGELOG.md | Records deprecations and precedence changes. |
| .github/workflows/release.yml | Switches to CLOUDSMITH_WORKSPACE. |
| .github/workflows/dev-release.yml | Switches to CLOUDSMITH_WORKSPACE. |
| .github/workflows/binaries.yml | Switches to CLOUDSMITH_WORKSPACE. |
Review effort: Balanced
- Keep --show-all (and other aliases) when list repos forwards its params. - Warn about deprecated config keys in subcommands that inherit the config, such as mcp start. - Let the last deprecated Workspace spelling on the command line win. - Warn only for config aliases still in effect after the profile loads. - Warn about CLOUDSMITH_WITHOUT_API_SSL_VERIFY only when its value is used.
cloudsmith-iduffy
approved these changes
Nov 2, 2026
coillteoir
approved these changes
Nov 2, 2026
tigh-latte
deleted the
eng-15245-audit-cli-aliases-and-add-deprecation-notices
branch
November 5, 2026 10:01
1 of 6 tasks
1 of 6 tasks
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.



Description
Each time the CLI renamed a setting, it kept the old name as a silent alias. Users never got a prompt to switch, so the aliases kept piling up and we had no plan to remove them. This PR deprecates the old names in ENG-15245 for removal in 2.0.0. When a user uses one, the CLI prints a single shared warning to stderr.
Before:
After:
Decision for each alias: deprecate all of them (they keep working until 2.0.0):
--api-proxy--proxyCLOUDSMITH_API_PROXYCLOUDSMITH_PROXYapi_proxyconfig keyproxy--allowed-api-proxy-suffixes,CLOUDSMITH_ALLOWED_API_PROXY_SUFFIXES(hidden)--allowed-proxy-suffixes,CLOUDSMITH_ALLOWED_PROXY_SUFFIXES--without-api-ssl-verify,-S--without-ssl-verifyCLOUDSMITH_WITHOUT_API_SSL_VERIFYCLOUDSMITH_SSL_VERIFY=0api_ssl_verifyconfig keyssl_verify--org,--organization,--oidc-org,--owner--workspace-o-wCLOUDSMITH_ORGCLOUDSMITH_WORKSPACEorg,organization,oidc_orgconfig keysworkspace--show-all--page-allcloudsmith auth--token,--force--request-api-key--json--output-format jsonWhat changed:
cloudsmith_cli/cli/deprecation.pyholds the shared warning (Warning: … is deprecated and will be removed in version 2.0.0. Use … instead.). It prints yellow text to stderr, once per run, and prints nothing during shell completion.--help.api_ssl_verify = true, which is the schema default and impossible to tell apart from an absent key. They also don't warn from the probe reads (relative-config guard, telemetry opt-out).auth --token/--force/--jsonandlogin/tokennow use the shared warning.DEPRECATION WARNING:is gone, so every deprecation message usesWarning:. Thelogintext keeps its November 20, 2026 cut-off.credential-helper docker/cargo/pnpm/terraform/generic) print no warning. Package managers run them non-interactively, and oldercredential-helper install terraformversions wrote--orginto~/.terraformrc.install,uninstallandliststill warn.CLOUDSMITH_WORKSPACEinstead ofCLOUDSMITH_ORG.config.inicomments and the credential-helper help text use the new names. The CHANGELOG has a new Deprecated section that records the removal plan.Type of Change
Additional Notes
One small behaviour change: when someone passes an old and a new flag on the same command line (
--org a --workspace b), the new one now wins. Before, the last one won, because they were the same Click option. This matches how the env vars and config keys already resolve. The CHANGELOG notes it. I didn't mark this breaking.--api-proxyis now a separate parameter, so_guard_untrusted_endpointstakes aproxy_trustedargument. Without it, a proxy given with--api-proxywould be checked like a value from an untrusted directory-relative config.Open questions from the ticket, resolved:
Warning:(matchesloginand other CLI warnings).Not in this PR: removing the aliases (that's for 2.0.0).
CLOUDSMITH_API_PROXYdoesn't warn on commands that never set up an HTTP session (for examplecloudsmith docs), because only the session setup reads it.Tests: new
cloudsmith_cli/cli/tests/test_deprecation.py(45 tests: every flag, env var and config alias; precedence; once-per-run; credential helper suppression; help output; JSON output keeps stdout clean), plus new auth flag cases intest_auth.py.