← Back to issue list

[google-cloud-sdk] `gcloud container clusters get-credentials` resolves symlinks from Snap executable

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1802385
Type
issue
State
open
Author
~jesse-glick
Labels
Created
Updated
Closed

Current evaluation

gcloud in the google-cloud-sdk snap writes the resolved /snap/google-cloud-sdk/N/bin/gcloud into ~/.kube/config instead of /snap/bin/gcloud, breaking kubeconfig after snap updates. Bug is in Google's gcloud code, not snapcraft; unaddressed for ~8 years.

Suggested action: close not a bug

Reason: The defect is in Google's gcloud code (it resolves argv[0] to the real path rather than using the invoked command), not in snapcraft — the reporter themselves notes they are 'not even sure whether this is the right place to file bugs for actual snap packages, as opposed to the snap tooling,' and the Google team declined to fix it. With no labels, zero comments, and no maintainer interaction in ~8 years, it is misdirected to this project and should be closed rather than left open.

Impact: 20 Quick Win: 15.0 Staleness: 95 Complexity: 25 Confidence: 65 Support Request: 10

Issue body

Originally reported as https://issuetracker.google.com/issues/118842667 but refiling here since the Google Cloud team only supports their own package repository and declined to fix a bug only known to affect the Snap packaging. Not even sure whether this is the right place to file bugs for actual snap packages, as opposed to the snap tooling. https://snapcraft.io/google-cloud-sdk gives https://cloud.google.com/sdk/docs/ as a contact link, but as I just noted, they do not agree; and the “verified account” is simply listed as “Cloud SDK (google-cloud-sdk)” with no further ownership information. From web searches all I can find is https://launchpad.net/~google-cloud-sdk-devel but I suppose they handle a PPA and not the snap? Anyway, to repeat the original bug: ---- The `gcloud container clusters get-credentials` command edits `~/.kube/config` and defines, among other things, `/users/*/user/auth-provider/config/cmd-path`. When gcloud is installed via Snap, this path is overly specific. Rather than `/snap/bin/gcloud` as expected, it saves for example `/snap/google-cloud-sdk/59/bin/gcloud`, which will not be correct or perhaps even work when the snap is next updated. What you expected to happen: The `cmd-path` should be set to the command actually used to invoke `gcloud`, not the fully-resolved `argv[0]`. Steps to reproduce: On Ubuntu Bionic, snap install google-cloud-sdk to add https://snapcraft.io/google-cloud-sdk to the system. Create a GKE cluster, then copy and run the Connect string from the UI: gcloud container clusters get-credentials … --zone … --project … Now look at `~/.kube/config`. It will contain for example cmd-path: /snap/google-cloud-sdk/59/bin/gcloud despite ~$ which gcloud /snap/bin/gcloud ~$ ls -l /snap/bin total 0 lrwxrwxrwx 1 root root 19 Nov 1 17:10 bq -> google-cloud-sdk.bq lrwxrwxrwx 1 root root 23 Nov 1 17:10 gcloud -> google-cloud-sdk.gcloud lrwxrwxrwx 1 root root 13 Nov 1 17:10 google-cloud-sdk.bq -> /usr/bin/snap lrwxrwxrwx 1 root root 13 Nov 1 17:10 google-cloud-sdk.gcloud -> /usr/bin/snap lrwxrwxrwx 1 root root 13 Nov 1 17:10 google-cloud-sdk.gsutil -> /usr/bin/snap lrwxrwxrwx 1 root root 23 Nov 1 17:10 gsutil -> google-cloud-sdk.gsutil …others… ~$ ls -l /snap/google-cloud-sdk total 0 drwxr-xr-x 13 root root 518 Oct 30 10:23 59 lrwxrwxrwx 1 root root 2 Nov 1 17:10 current -> 59 ~$ ls -l /snap/google-cloud-sdk/59 total 328 drwxr-xr-x 3 root root 263 Oct 30 10:23 bin -rwxr-xr-x 1 root root 35 Oct 30 10:23 command-bq.wrapper -rwxr-xr-x 1 root root 39 Oct 30 10:23 command-gcloud.wrapper -rwxr-xr-x 1 root root 39 Oct 30 10:23 command-gsutil.wrapper …etc… Workaround: manually edit the config file whenever updating the snap.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 20
Quick Win: 15.0
Staleness: 95
Complexity: 25
Confidence: 65
Support Request: 10
close not a bug gcloud in the google-cloud-sdk snap writes the resolved /snap/google-cloud-sdk/N/bin/gcloud into ~/.kube/config instead of /snap/bin/gcloud, breaking kubeconfig after snap updates. Bug is in Google's gcloud code, not snapcraft; unaddressed for ~8 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 25
Confidence: 90
Support Request: 30
close stale Bug report regarding gcloud container clusters get-credentials incorrectly resolving Snap symlink paths. Unaddressed for over 7 years with no maintainer interaction.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 5
close stale gcloud saves hardcoded snap version paths in kubeconfig instead of symlinks. Untriaged, inactive for over seven years, upstream declined to fix.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 20
Confidence: 90
Support Request: 25
close stale Bug report regarding gcloud saving absolute snap package paths instead of symlinks in kubeconfig. Author notes upstream declined to fix it. Issue is abandoned and inactive for over 7 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 0
close stale gcloud container clusters get-credentials stores absolute snap paths instead of symlinks in kube config, breaking on updates. Unanswered for 7+ years; upstream declined to fix.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.