I was creating a past revision in Cloud Run and received the following error message.
Revision '<SERVICE_NAME>-00037-hep' does not exist or is deleted. Update all traffic to route to currently available revisions.
After this, I am unable to switch traffic or build a new build.
What should I do to resolve this?
I hit same issue. I looks like there are non-existing entries in Cloud Run service traffic routing list.
You can use gcloud run services describe <SERVICE_NAME> --format=json | jq '.status.traffic'
to see the full traffic routing list
Initially I tried to remove only broken revision using tag that was mapped to missing revision using gcloud run services update-traffic <SERVICE_NAME> --remove-tags ...
command, but it did not work.
In the end I used following workaround:
gcloud run services update-traffic <SERVICE_NAME> --clear-tags
this removed all the tags attached to this service. Then I restored only some important tags manually.