无法删除GoogleCloudTasksQueue上的appEngineRoutingOverride

我无法让我的 Cloud Tasks 队列停止覆盖应用引擎服务路由。我通过 GCP 仪表板创建了队列,而不是使用 queue.yml 或其他任何东西。

队列说明:

$ 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

尝试清除路由覆盖标志--clear-routing-override似乎成功但实际上并未清除该标志

$ 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

如果我将路由更改为另一个服务,--routing-override更改成功,但这意味着我只能让任务指向此队列中的一个特定服务。此外,如果我更改路由,然后单击Edit Queue“队列详细信息”面板,应用引擎路由覆盖字段将为空白,不会填充我之前指定的服务。如果我单击保存,该appEngineRoutingOverride标志将重置为default服务主机。即使我通过Edit Queue面板更改覆盖选项,刷新,然后再打开它,服务仍然不会被填充,这意味着如果我更改服务覆盖一次并且我的团队中的某个人需要更改另一个设置,例如速率限制,那么路由将被重置,事情将被打破。

imgur vid清楚地展示了这个问题

编辑:这已在 GCP 问题跟踪器上报告过几次

  • https://issuetracker.google.com/issues/179701687
  • https://issuetracker.google.com/issues/177651361
  • https://issuetracker.google.com/issues/176221773

回答

做了一些挖掘,不要使用 can.google.com 上的 UI 创建或更新队列。

新的将始终host指向默认值。更新的将获得host指向默认值..然后你就默默地把你的队列弄乱了。

使用 cli 命令创建和更新队列

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

根据您的需要调整标志。此命令用作 upsert

(刚刚意识到我是如何弄乱我的队列的,我不小心通过 Web UI 更新了它)


以上是无法删除GoogleCloudTasksQueue上的appEngineRoutingOverride的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>