Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悶 [Bug Report] - Repository "containers" not found #412

Open
andreif opened this issue Dec 26, 2023 · 2 comments
Open

馃悶 [Bug Report] - Repository "containers" not found #412

andreif opened this issue Dec 26, 2023 · 2 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@andreif
Copy link

andreif commented Dec 26, 2023

Describe the bug
I am trying to follow the guide how to modify and deploy changes to the dynamic web app.

On step 10 (Build a server container image, 2), I am executing command

cd ~/avocano/
gcloud builds submit --config \
    provisioning/server.cloudbuild.yaml

And after multiple steps it's trying to push the image that has been built and then fails

PUSH
Pushing europe-west1-docker.pkg.dev/***-***-***/containers/server
The push refers to repository [europe-west1-docker.pkg.dev/***-***-***/containers/server]
...
name unknown: Repository "containers" not found

I have changed us-docker.pkg.dev to europe-west1-docker.pkg.dev since it's where I am deploying to but it did not help to resolve the issue. Any ideas what went wrong?

@andreif andreif added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 26, 2023
@glasnt
Copy link
Collaborator

glasnt commented Jan 1, 2024

Thanks for reporting this issue, @andreif.

As part of this application migrating from using Container Registry (available by default on all projects) to Artifact Registry, it looks like the deployment method you used didn't create the registry. At the moment, this application presumes using the US multi-region for this registry (resulting in us-docker.pkg.dev URLs).

The workaround for now is to run the setup script:


gcloud artifacts repositories create containers \
    --repository-format=docker \
    --location=us

The more correct solution is for the deployment to create this artifact registry for you, respecting the region selected, and ensuring all scripts reference the region selection.

(Developer note: the avocano-based setup creates the artifact registry, but the terraform-based setup doesn't, relying on the pre-created container for deployment. The registry should be created on deployment, noting it won't be used. Alternatively, the registry should be created before this gcloud builds submit step of this tutorial)

@carlosaenz26
Copy link

Hey guys,
as metioned above i ran
gcloud artifacts repositories create containers
--repository-format=docker
--location=us

after doing so in the 3 step, one must Update this job to use the image I just built, which includes my code changes. so I ran
gcloud run jobs update
migrate${DEPLOY_SUFFIX}
--image
gcr.io/${PROJECT_ID}/server
--region $REGION

but I got this error:
X Updating job... Image 'gcr.io/myprojectid/server' not found.
Job failed to deploy
I understand that the image is now in the containers right? if so how in the job do specify that?

please help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants