gpt4 book ai didi

google-cloud-platform - Cloud Build 在阻塞在 Queued 的工作池中构建

转载 作者:行者123 更新时间:2023-12-04 17:14:14 25 4
gpt4 key购买 nike

我们使用 Google Cloud Build 作为 CI/CD 工具,我们使用私有(private)池来使用私有(private) IP 连接到我们的数据库。
从 08/27 开始,我们使用私有(private)池的构建被困在 Queued并且永远不会因超时而失败,它们只是卡在那里,直到我们取消它们。
我们已经尝试过没有成功:

  • 将工作池更改为另一个区域(从 southamerica-east1us-central1);
  • 重新创建具有不同配置的工作池;
  • 重新创建所有触发器和连接。

  • 删除工作池配置(在全局中运行构建)执行构建。
    云构建.yaml:
    steps:
    - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
    id: Backup database
    args: ['gcloud', 'sql', 'backups', 'create', '--instance=${_DATABASE_INSTANCE_NAME}']

    - name: 'node:14.17.4-slim'
    id: Migrate database
    entrypoint: npm
    dir: 'build'
    args: ['...']
    secretEnv: ['DATABASE_URL']

    - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
    id: Migrate traffic to new version
    dir: 'build'
    entrypoint: bash
    args: ['-c', 'gcloud app services set-traffic ${_SERVICE_NAME} --splits ${_VERSION_NAME}=1']

    availableSecrets:
    secretManager:
    - versionName: '${_DATABASE_URL_SECRET}'
    env: 'DATABASE_URL'

    options:
    pool:
    name: 'projects/$PROJECT_ID/locations/southamerica-east1/workerPools/<project-id>'
    我们的工作池配置:
    $ gcloud builds worker-pools describe <worker-pool-id> --region=southamerica-east1 --project=<project-id>

    createTime: '2021-08-30T19:35:57.833710523Z'
    etag: W/"..."
    name: <worker-pool-id>
    privatePoolV1Config:
    networkConfig:
    egressOption: PUBLIC_EGRESS
    peeredNetwork: projects/<project-id>/global/networks/default
    workerConfig:
    diskSizeGb: '1000'
    machineType: e2-medium
    state: RUNNING
    uid: ...
    updateTime: '2021-08-30T20:14:13.918712802Z'

    最佳答案

    这是我上周与 Cloud Build PM 的讨论... TL;DR:如果您不支持订阅或公司帐户,则不能(目前)
    详细可以查看 1. 责任珠宝业委员会的链接,你会明白
    enter image description here
    如果仔细观察,您会看到(使用我的个人帐户,即使我有组织结构)每个工作池的并发构建数设置为 0。这就是构建作业无限队列的原因。
    最烦人的部分是这个。单击 Concurrent build per worker pool 行复选框,然后单击编辑以更改限制。在这里你得到什么
    enter image description here
    仔细阅读:在 0 和 0 之间设置一个限制。
    因此,如果您不支持订阅(像我一样),则无法通过个人帐户使用该功能。我可以将它与我的公司帐户一起使用,即使我不应该......
    目前,我没有解决方案,只有来自 PM 的最新消息

    The behaviour around quota restrictions in private pools is a recent change that we're still iterating on and appreciate the feedback to make it easier for personal accounts to try out the feature.

    关于google-cloud-platform - Cloud Build 在阻塞在 Queued 的工作池中构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68990015/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com