recursecenter / pairing-bot

A Zulip bot that partners people for pair programming practice
MIT License
22 stars 15 forks source link

Bug: Switch Cloud Build from Container Registry to Artifact Registry #52

Closed cceckman closed 3 months ago

cceckman commented 3 months ago

Per @stillgreenmoss : Google is shutting down Container Registry, with Artifact Registry as the replacement. Looks like this page has the transition documentation.

I don't think Pairing Bot uses GCR directly,[^1] but the builds going through Cloud Build may? (They refer to gcr.io/cloud-builders, but that's still correct.)

Once #51 is done and we have some builds running, it would be good to check the usage and see if we actually need to do something here -- or if this is just, "You have the API enabled, so we're sending you the email."

[^1]: GAE Standard Environment uses GCS to store data, but they aren't container images per se -- not using gcr.io.

cceckman commented 3 months ago

Both projects report usage: ACTIVE from the check tool.

Poking at the container registry console, the paths are in the app-engine-tmp directory; i.e. GAE is using the

This answer at googlecloudcommunity.com says we shouldn't have to do anything...? I'm unclear whether that's official.

Another answer pointed here, which I think tells us that the relevant usage is "of gcr.io domains". There's a happy path for that.

stillgreenmoss commented 3 months ago

hmmmm all i remember is that when i investigated this a few months ago i concluded that we did need to change something about how pairing bot builds for this. i think that was based on this blog post https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr

cceckman commented 3 months ago

Yeah - sorry, I didn't update here:

I used the "transition to gcr.io" option here for the testbot project. #56 made it out to testbot successfully -- I can see the changes in the logs.

I think that option winds up ~transparently pointing the relevant bucket to Artifact Registry instead of Container Registry? So the GAE configuration / Cloud Build configuration doesn't actually have to change, just the backend for the image store has changed.

I only ran it for the test project, not for the prod project; that's still TODO. (FWIW, I had to do a bunch of retries/approves/etc to get through the automated tool for the migration, but it did go through eventually.)

cceckman commented 3 months ago

Ran the migration for the prod project as well; completed successfully. I think we're good!