Skip to content

feat: Use GetService over ListServices during traffic lookup

Sylvester Chin requested to merge sc1-direct-lookup into main

feat: Use GetService over ListServices during traffic lookup

This also avoids flakiness when the asset inventory reports differently from cloud run.

As experienced by duo-workflow during the initial deployment in https://gitlab.com/gitlab-com/gl-infra/platform/runway/deployments/duo-workflow/-/jobs/7568339776#L175 where traffic map was traffic_map="{\"us-east1\":{\"@NEW@\":{\"traffic_pct\":0,\"tag\":\"canary\"}}}"

Since it was a first deployment, we should expect stable revision to be set at 100% traffic pct. However, prior to this job, there was a failure due to a bad container https://gitlab.com/gitlab-com/gl-infra/platform/runway/deployments/duo-workflow/-/jobs/7568163609#L1042. There was no cloud run revision soon after since it got removed.

I believe that the asset inventory lookup gave a non-empty response and was used subsequently for cloud run revision lookup where nothing was found:

Merge request reports