← 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 from the Snap writes a version-pinned /snap/google-cloud-sdk/59/bin/gcloud as cmd-path in ~/.kube/config. Filed on snapcraft, but the snap is Google-published and Google declined to fix it; no maintainer response, unlabelled.

Suggested action: close not a bug

Reason: The defect is entirely outside this project's codebase: grep across the repo for 'google-cloud-sdk' and 'cmd-path' returns no matches, and git log for 'google-cloud-sdk'/'gcloud' finds no related commits — snapcraft is the build tool and does not generate or maintain that snap's wrappers. The reporter himself states the Google Cloud team 'only supports their own package repository and declined to fix a bug only known to affect the Snap packaging' and asks 'Not even sure whether this is the right place to file bugs for actual snap packages', so this is a misfiled upstream/packaging report with no action available to snapcraft maintainers. Confidence is held below 80 because there is no maintainer comment or label, and the described GKE 'auth-provider/cmd-path' behaviour is legacy and may also be moot in current gcloud/kubectl, which I could not verify from repo evidence.

Evaluated by: mr-cal-bot

Impact: 25 Quick Win: 1 Complexity: 45 Confidence: 68 Actionability: 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
stealth/space-bunny-alpha
Impact: 25
Quick Win: 1
Complexity: 45
Confidence: 68
Actionability: 10
close not a bug gcloud from the Snap writes a version-pinned /snap/google-cloud-sdk/59/bin/gcloud as cmd-path in ~/.kube/config. Filed on snapcraft, but the snap is Google-published and Google declined to fix it; no maintainer response, unlabelled.
stealth/space-bunny-alpha
Impact: 42
Quick Win: 13
Complexity: 50
Confidence: 76
Actionability: 62
needs triage Cloud SDK’s Snap reportedly stores a revision-specific gcloud path in kubeconfig, potentially breaking GKE auth after refresh; this old, untriaged report needs a current reproducer and ownership check.
qwen/qwen3.8-27b
Impact: 20
Quick Win: 15
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.

Update history

Date Change
created

Related work

  • Related To: google/issues/118842667 (confidence 90%)

    Explicitly cited in the body as the original upstream report ('Originally reported as https://issuetracker.google.com/issues/118842667'), which Google declined to handle for the Snap packaging.

Related issues

No related issues found above the similarity threshold.