GoogleCloudPlatform / cloud-sdk-docker

Google Cloud CLI Docker Image - Docker Image containing the gcloud CLI and its bundled components.
https://cloud.google.com/sdk/docs/downloads-docker
Apache License 2.0
744 stars 230 forks source link

gcloud-sdk-bookworm InRelease' changed its 'Label' value from 'cloud-sdk-bullseye' to 'cloud-sdk-bookworm' #378

Open navilg opened 6 months ago

navilg commented 6 months ago

apt update command is failing with below error in google/cloud-sdk:slim image

W: https://packages.cloud.google.com/apt/dists/cloud-sdk-bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: Repository 'https://packages.cloud.google.com/apt cloud-sdk-bookworm InRelease' changed its 'Origin' value from 'cloud-sdk-bullseye' to 'cloud-sdk-bookworm'
E: Repository 'https://packages.cloud.google.com/apt cloud-sdk-bookworm InRelease' changed its 'Label' value from 'cloud-sdk-bullseye' to 'cloud-sdk-bookworm'
bobidle commented 6 months ago

Pulling the latest google/cloud-sdk:slim image should fix your issue. See also #373

cloudsdkdocker commented 6 months ago

Sorry navilg, this was caused by an issue in a redirection service routing to artifact registry. I've done a trivial change to our AR repos to force them to reindex so this should hopefully be fixed now. Please let me know if you continue to encounter issues.

navilg commented 6 months ago

It was fixed around 6 hours back. But now its again same. But now error message shows changed its 'Origin' value from 'cloud-sdk-bookworm' to 'cloud-sdk-bullseye'

I see below in package repository where label and origin is cloud-sdk-bulleye for cloud-sdk-bookworm package

image

image

EnriqueHormilla commented 6 months ago

Pulling the latest google/cloud-sdk:slim image should fix your issue. See also #373

Use cloud-sdk:450.0.0-slim as a workaround, it´s from bullseye-slim.

cloudsdkdocker commented 6 months ago

The issue here is a bit annoying:

The original state of the bookworm origin/label WAS cloud-sdk-bullseye as the bookworm repository in our internal package hosting service was created as an indirection onto cloud-sdk-bullseye.

We've migrated our hosting to Artifact Registry while enabling redirection on the original package URLs. A side effect was that AR used the new cloud-sdk-bookworm repo as its own Origin/Label, differing from the previous hosting service. This was the first error you received.

Despite AR's labels matching the repo and being more correct, we updated the labels for bookworm back to "cloud-sdk-bullseye" to avoid breakages for most users who hadn't tried to update since the migration happened. This is the new error you're experiencing.

To proceed with updates you can specify the --allow-releaseinfo-change flag for apt-get update. (I believe apt-get upgrade` will fix it as well but I haven't confirmed)

navilg commented 6 months ago

Thanks @cloudsdkdocker Its working with above flag.

I see existing docker images tags are overwritten. Isn't it against version immutability rule ? I think you should be considering to push newer image with same gcloud version with some sub-patch for e.g. 467.0.0-0, 467.0.0-1 and so on.

467.0.0 was published the day-before-yesterday and then same was overwritten yesterday.

rafaelsms commented 6 months ago

The latest slim image sha256:8e34405b8abc from 2 hours ago fixed it (without needing the --allow-releaseinfo-change flag). Thanks!