0

I have an issue with Artifact Registry when want to redirect back it to Container registry. gcloud artifacts settings disable-upgrade-redirection --project=xx

  1. IAM roles are set roles/artifactregistry.admin, roles/artifactregistry.createOnPushRepoAdmin
  2. Previously there were images and kubectl pods running on these images, after removing all and trying to revert, the issue appeared
  3. Logs: gcloud artifacts settings disable-upgrade-redirection --log-http --verbosity=debug
  File "/home/xx/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 612, in __ProcessHttpResponse
    raise exceptions.HttpError.FromResponse(
apitools.base.py.exceptions.HttpBadRequestError: HttpError accessing <https://artifactregistry.googleapis.com/v1/projects/xxx/projectSettings?alt=json&updateMask=legacy_redirection_state>: response: <{'vary': 'Origin, X-Origin, Referer', 'content-type': 'application/json; charset=UTF-8', 'content-encoding': 'gzip', 'date': 'Fri, 10 Jan 2025 14:33:45 GMT', 'server': 'ESF', 'cache-control': 'private', 'x-xss-protection': '0', 'x-frame-options': 'SAMEORIGIN', 'x-content-type-options': 'nosniff', 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000', 'transfer-encoding': 'chunked', 'status': 400}>, content <{
  "error": {
    "code": 400,
    "message": "Precondition check failed.",
    "status": "FAILED_PRECONDITION"
  }
}
  1. Push and pull for Docker images in Artifact registry still working.

How could I resolve this issue?

3
  • Do you get the error if you invoke the method directly? projects.updateProjectSettings Commented Jan 11 at 2:13
  • Yep, the same error Commented Jan 13 at 10:18
  • That eliminates gcloud from the issue. I gcloud iam roles describe (1) roles/artifactregistry.containerRegistryMigrationAdmin (which you don't have) and it includes artifactregistry.projectsettings.update which (2) roles/artifactregistry.createOnPushRepoAdmin does not. I think that's your issue Commented Jan 13 at 16:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.