3
votes

I can't get my Cloud Tasks queue to stop overriding the app engine service routing. I created the queue through the GCP dashboard, not using queue.yml or anything else.

Description of the queue:

$ gcloud tasks queues describe import
appEngineRoutingOverride:
  host: my-project-id.uc.r.appspot.com
name: projects/my-project-id/locations/us-central1/queues/import
purgeTime: '2021-03-31T00:45:22.941195Z'
rateLimits:
  maxBurstSize: 100
  maxConcurrentDispatches: 1000
  maxDispatchesPerSecond: 500.0
retryConfig:
  maxAttempts: 100
  maxBackoff: 3600s
  maxDoublings: 16
  minBackoff: 0.100s
state: PAUSED

Attempting to clear the routing override flag with --clear-routing-override appears to be successful but does not actually clear the flag

$ gcloud tasks queues update import --clear-routing-override
WARNING: You are managing queues with gcloud, do not use queue.yaml or queue.xml in the future. More details at: https://cloud.google.com/tasks/docs/queue-yaml.
Updated queue [import].
$ gcloud tasks queues describe import
appEngineRoutingOverride:
  host: my-project-id.uc.r.appspot.com
name: projects/my-project-id/locations/us-central1/queues/import
purgeTime: '2021-03-31T01:15:16.727288Z'
rateLimits:
  maxBurstSize: 20
  maxConcurrentDispatches: 1000
  maxDispatchesPerSecond: 100.0
retryConfig:
  maxAttempts: 100
  maxBackoff: 3600s
  maxDoublings: 16
  minBackoff: 0.100s
state: PAUSED

If I change the routing to another service with --routing-override the change is successful, but that means I can only have tasks pointing to one specific service in this queue. Additionally, if I change the routing, then click on Edit Queue on the Queue details panel the app engine routing override fields will be blank, not populated with the service I specified earlier. If I click save the appEngineRoutingOverride flag will reset to the default service host. Even if I change the override options through the Edit Queue panel, refresh, then open it back up the service will still not be populated, meaning if I change the service override once and somebody on my team needs to change another setting such as rate limits then the routing will be reset and things will break.

imgur vid to clearly demonstrate the issue

EDIT: This has been reported on the GCP issue tracker a few times

1
Oh I wish I found your post earlier. Just spent the last 4 hours fighting this. For some reason one of my queues somehow had it set. This must be a new feature they silently pushed and in true google cloud way I can barely find any docs on this and only find out about this feature after discovering it as a potential bug. Oh google cloud.... - mlablablab
This question is life saving. I also just lost 4 hours before founding this treasure. I will open a support ticket directly to Google Cloud so that I least they put that as "Known Issues" in their documentation. - MadJlzz

1 Answers

7
votes

Did some digging, DO NOT use the UI on could.google.com to create or update queues.

New ones will always have a host pointing to defaults. And updated ones will get a host pointing to default.. and then you have silently messed up your queue.

Use the cli command to create and update queues

gcloud tasks queues update mey-new-queue --max-dispatches-per-second=10 --max-concurrent-dispatches=3

adjust the flags to what you need. This command works as an upsert

(just realized how I messed up my queue, I accidentally updated it through the web UI)