Repository navigation
feat(ENG-15016): keep install-time settings in the Docker credential helper - #512
Draft
cloudsmith-iduffy wants to merge 2 commits into
Draft
cloudsmith-iduffy wants to merge 2 commits into
cloudsmith-iduffy wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Helper-name collisions and ignored root-level profile flags can overwrite or remove the wrong installation.
2 open issues
What changed in this PR
Preserves install-time settings in Docker credential helpers so they behave consistently across shells, IDEs, and Docker Desktop.
Changes:
- Adds profile/workspace-scoped launchers with persisted settings.
- Supports scoped uninstall and status reporting.
- Adds regression tests and changelog documentation.
| File | Description |
|---|---|
| cloudsmith_cli/credential_helpers/docker/installer.py | Persists settings and manages scoped helpers. |
| cloudsmith_cli/cli/tests/commands/test_credential_helper_install.py | Tests scoped installation, dry runs, removal, and status. |
| cloudsmith_cli/cli/commands/credential_helper/manage.py | Passes explicit uninstall scope to Docker. |
| CHANGELOG.md | Documents settings persistence and scoped helper behavior. |
Review effort: Balanced
cloudsmith-iduffy
force-pushed
the
iduffy/eng-15016-docker-launcher-settings
branch
from
October 21, 2026 14:22
872e0f1 to
a8be9d2
Compare
cloudsmith-iduffy
force-pushed
the
iduffy/eng-15016-docker-launcher-settings
branch
from
October 21, 2026 15:09
a8be9d2 to
97e3ea7
Compare
cloudsmith-iduffy
force-pushed
the
iduffy/eng-15016-docker-launcher-settings
branch
from
October 21, 2026 15:13
97e3ea7 to
4e7814a
Compare
cloudsmith-iduffy
force-pushed
the
iduffy/eng-15016-docker-launcher-settings
branch
from
October 21, 2026 15:34
4e7814a to
8689c22
Compare
cloudsmith-iduffy
removed this pull request from stack #513
October 21, 2026 16:30
cloudsmith-iduffy
force-pushed
the
iduffy/eng-15016-docker-launcher-settings
branch
from
October 21, 2026 16:30
8689c22 to
aff4b9b
Compare
cloudsmith-iduffy
added this pull request to stack #516
October 21, 2026 16:30
…helper Docker runs `docker-credential-cloudsmith` with the environment of the Docker client, for example Docker Desktop or an IDE. The flags and CLOUDSMITH_* variables of the install were lost, so later pulls used another profile, Workspace or API host. - The Docker installer now keeps the install-time settings in the launcher. - An install with a profile or a Workspace writes its own helper, `cloudsmith-<profile>-<workspace>`, so that installs can coexist. An install without them writes `cloudsmith`, as before. - The install shows a warning when it moves a host from a different Cloudsmith helper. - `uninstall docker -P <profile> -w <workspace>` removes only the helper of that install. The scope comes only from flags, so that a plain `uninstall docker` removes the unscoped helper, as before. - `list` shows the hosts of all Cloudsmith helpers and the launcher that they use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cloudsmith-iduffy
force-pushed
the
iduffy/eng-15016-docker-launcher-settings
branch
from
October 21, 2026 17:11
aff4b9b to
a3667bb
Compare
- Read the profile and the Workspace of an install from its launcher settings. - Stop an install or an uninstall when the launcher with that name has a different profile or Workspace, for example `-P acme` and `-w acme`. - Take the uninstall profile also from a `-P` on a parent command. - Do not keep the colour settings in a launcher. A `ColorMode` value caused a TypeError in the install. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been 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.

Description
credHelpersin~/.docker/config.jsonholds only a helper name, and Docker runs the helper with the environment of the Docker client. So aCLOUDSMITH_PROFILE=meta cloudsmith credential-helper install dockerwas forgotten on the next pull from Docker Desktop, an IDE or a new terminal (ENG-15016).The Docker installer now keeps the install-time settings in its launcher (see #511). An install with a profile or a Workspace also gets its own helper:
credHelpersvaluedocker-credential-cloudsmithcloudsmith-P metadocker-credential-cloudsmith-metacloudsmith-meta-w acmedocker-credential-cloudsmith-acmecloudsmith-acmedocker-credential-cloudsmith-meta-acmecloudsmith-meta-acmecredHelpersmaps one host to one helper, so a host that two installs configure, such asdocker.cloudsmith.io, uses the last install. The install shows a warning when it moves a host from a different Cloudsmith helper.uninstall docker -P meta -w acmeremoves only that helper. A-Pon the root command (cloudsmith -P meta credential-helper uninstall …) also counts. The scope comes only from flags, so a plainuninstall dockerremoves the unscoped helper as before, also in a shell that setsCLOUDSMITH_WORKSPACE.listshows the hosts of everycloudsmithandcloudsmith-*helper, and the launcher that they use.--dry-runshows the scoped launcher and the names of the settings that it keeps.The ticket proposed CLI flags in the launcher. I used environment variables instead, so Docker and NuGet share one mechanism and the keyring settings, which have no flags, are kept too.
Type of Change
Additional Notes
Testing. I ran a live
docker pullof a private image ondocker.cloudsmith.iowith only a SAML session. A temporaryconfig.inisent the default profile to an API host with no SAML session, and profilee2etoapi.cloudsmith.io. I installed withCLOUDSMITH_PROFILE=e2e,CLOUDSMITH_WORKSPACEandCLOUDSMITH_CONFIG_FILEinto a temporaryDOCKER_CONFIGand bin directory. Then:env -i … docker pullwith noCLOUDSMITH_*variables worked.CLOUDSMITH_PROFILE=default CLOUDSMITH_WORKSPACE=otherin the caller environment also worked.unauthorized.uninstall docker -P e2e -w <workspace>removed the launcher and thecredHelpersentry.Known limits.
[a-z0-9-], so-P acmeand-w acmeboth givecloudsmith-acme. These two installs cannot exist together: the second one stops with an error. Two installs that differ only in--api-hostshare a name, and the last install wins. The ticket suggested a hash suffix for this. I left it out, because it makes the names hard to predict and to uninstall.listshows one launcher for the Docker hosts, also when they use different helpers.CLOUDSMITH_PROXYorHTTPS_PROXYwhere Docker runs.🤖 Generated with Claude Code