From 6266cc3b6464484b77e2d3a2c24254505e322e08 Mon Sep 17 00:00:00 2001 From: neuronull Date: Fri, 26 May 2023 10:23:54 -0600 Subject: [PATCH 1/2] chore(ci): fix a few logic bugs and more strict comment parsing --- .github/workflows/integration-comment.yml | 72 +++++++++++------------ .github/workflows/k8s_e2e.yml | 2 +- .github/workflows/regression.yml | 2 +- 3 files changed, 36 insertions(+), 40 deletions(-) diff --git a/.github/workflows/integration-comment.yml b/.github/workflows/integration-comment.yml index ce72d06959317..629278ff95c20 100644 --- a/.github/workflows/integration-comment.yml +++ b/.github/workflows/integration-comment.yml @@ -40,10 +40,6 @@ env: CI: true PROFILE: debug -concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.id }} - cancel-in-progress: true - jobs: prep-pr: name: (PR comment) Signal pending to PR @@ -81,73 +77,73 @@ jobs: matrix: run: - test_name: 'amqp' - if: ${{ contains(github.event.comment.body, 'amqp') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-amqp') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'appsignal' - if: ${{ contains(github.event.comment.body, 'appsignal') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-appsignal') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'aws' - if: ${{ contains(github.event.comment.body, 'aws') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-aws') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'axiom' - if: ${{ contains(github.event.comment.body, 'axiom') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-axiom') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'azure' - if: ${{ contains(github.event.comment.body, 'azure') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-azure') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'clickhouse' - if: ${{ contains(github.event.comment.body, 'clickhouse') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-clickhouse') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'databend' - if: ${{ contains(github.event.comment.body, 'databend') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-databend') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'datadog-agent' - if: ${{ contains(github.event.comment.body, 'datadog') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'datadog-logs' - if: ${{ contains(github.event.comment.body, 'datadog') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'datadog-metrics' - if: ${{ contains(github.event.comment.body, 'datadog') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'datadog-traces' - if: ${{ contains(github.event.comment.body, 'datadog') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'dnstap' - if: ${{ contains(github.event.comment.body, 'dnstap') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-dnstap') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'docker-logs' - if: ${{ contains(github.event.comment.body, 'docker-logs') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-docker-logs') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'elasticsearch' - if: ${{ contains(github.event.comment.body, 'elasticsearch') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-elasticsearch') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'eventstoredb' - if: ${{ contains(github.event.comment.body, 'eventstoredb') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-eventstoredb') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'fluent' - if: ${{ contains(github.event.comment.body, 'fluent') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-fluent') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'gcp' - if: ${{ contains(github.event.comment.body, 'gcp') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-gcp') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'humio' - if: ${{ contains(github.event.comment.body, 'humio') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-humio') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'http-client' - if: ${{ contains(github.event.comment.body, 'http-client') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-http-client') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'influxdb' - if: ${{ contains(github.event.comment.body, 'influxdb') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-influxdb') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'kafka' - if: ${{ contains(github.event.comment.body, 'kafka') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-kafka') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'logstash' - if: ${{ contains(github.event.comment.body, 'logstash') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-logstash') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'loki' - if: ${{ contains(github.event.comment.body, 'loki') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-loki') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'mongodb' - if: ${{ contains(github.event.comment.body, 'mongodb') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-mongodb') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'nats' - if: ${{ contains(github.event.comment.body, 'nats') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-nats') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'nginx' - if: ${{ contains(github.event.comment.body, 'nginx') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-nginx') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'opentelemetry' - if: ${{ contains(github.event.comment.body, 'opentelemetry') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-opentelemetry') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'postgres' - if: ${{ contains(github.event.comment.body, 'postgres') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-postgres') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'prometheus' - if: ${{ contains(github.event.comment.body, 'prometheus') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-prometheus') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'pulsar' - if: ${{ contains(github.event.comment.body, 'pulsar') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-pulsar') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'redis' - if: ${{ contains(github.event.comment.body, 'redis') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-redis') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'shutdown' - if: ${{ contains(github.event.comment.body, 'shutdown') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-shutdown') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'splunk' - if: ${{ contains(github.event.comment.body, 'splunk') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-splunk') || contains(github.event.comment.body, '/ci-run-all') }} - test_name: 'webhdfs' - if: ${{ contains(github.event.comment.body, 'webhdfs') || contains(github.event.comment.body, 'all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-webhdfs') || contains(github.event.comment.body, '/ci-run-all') }} update-pr-status: name: Signal result to PR diff --git a/.github/workflows/k8s_e2e.yml b/.github/workflows/k8s_e2e.yml index 06c5ace79cddd..720b46ada5c25 100644 --- a/.github/workflows/k8s_e2e.yml +++ b/.github/workflows/k8s_e2e.yml @@ -26,7 +26,7 @@ on: - cron: '0 0 * * 2-6' concurrency: - group: ${{ github.workflow }}-${{ github.event.number || github.event.issue.id || github.event.merge_group.base_sha || github.event.schedule || github.sha }} + group: ${{ github.workflow }}-${{ github.event.number || github.event.comment.html_url || github.event.merge_group.base_sha || github.event.schedule || github.sha }} cancel-in-progress: true diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 681a6757cfafa..0f9d2ef9f2f81 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -34,7 +34,7 @@ on: pull_request: concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.id || github.event.merge_group.base_sha || github.sha }} + group: ${{ github.workflow }}-${{ github.event.merge_group.base_sha || github.sha }} cancel-in-progress: true jobs: From 2df9e8616fd4874c0ad2c5676710e9c2c838148d Mon Sep 17 00:00:00 2001 From: neuronull Date: Fri, 26 May 2023 11:12:03 -0600 Subject: [PATCH 2/2] use head sha not base for merge queue concurrency check --- .github/workflows/integration.yml | 2 +- .github/workflows/k8s_e2e.yml | 2 +- .github/workflows/master_merge_queue.yml | 20 +------------------- .github/workflows/regression.yml | 2 +- .github/workflows/test.yml | 2 +- 5 files changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index d8ebebfc7f50e..959c43dde7058 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -13,7 +13,7 @@ on: concurrency: # `github.event.number` exists for pull requests, otherwise fall back to SHA for merge queue - group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.base_sha }} + group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }} cancel-in-progress: true env: diff --git a/.github/workflows/k8s_e2e.yml b/.github/workflows/k8s_e2e.yml index 720b46ada5c25..f9360132d71e0 100644 --- a/.github/workflows/k8s_e2e.yml +++ b/.github/workflows/k8s_e2e.yml @@ -26,7 +26,7 @@ on: - cron: '0 0 * * 2-6' concurrency: - group: ${{ github.workflow }}-${{ github.event.number || github.event.comment.html_url || github.event.merge_group.base_sha || github.event.schedule || github.sha }} + group: ${{ github.workflow }}-${{ github.event.number || github.event.comment.html_url || github.event.merge_group.head_sha || github.event.schedule || github.sha }} cancel-in-progress: true diff --git a/.github/workflows/master_merge_queue.yml b/.github/workflows/master_merge_queue.yml index 6e38bd7f29a24..eaf5b7bf08295 100644 --- a/.github/workflows/master_merge_queue.yml +++ b/.github/workflows/master_merge_queue.yml @@ -21,7 +21,7 @@ on: concurrency: # `github.event.number` exists for pull requests, otherwise fall back to SHA for merge queue - group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.base_sha }} + group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }} cancel-in-progress: true env: @@ -106,24 +106,6 @@ jobs: needs: changes secrets: inherit - # TODO: in a followup PR, run the regression workflow here, as a single reusable workflow. - # - # NOTE: This design of passing in the pr-number to the Regression workflow requires that the merge queue - # be configured contain a maximum of one PR per execution. This is so that the regression report generated - # by the workflow can be posted as a comment to the PR. - # At a later time, we may want to revisit this in order to allow multiple PRs to be included in a merge - # queue execution. At such time, the logic of uploading of the report will need to change to account for - # multiple PRs. - # regression: - # if: needs.changes.outputs.source == 'true' - # uses: ./.github/workflows/regression.yml - # with: - # pr_number: ${{ needs.changes.outputs.pr-number }} - # base_sha: ${{ github.event.merge_group.base_sha }} - # head_sha: ${{ github.event.merge_group.head_sha }} - # needs: changes - # secrets: inherit - master-merge-queue-check: name: Master Merge Queue Suite # Always run this so that pull_request triggers are marked as success. diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 0f9d2ef9f2f81..629ae62c201db 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -34,7 +34,7 @@ on: pull_request: concurrency: - group: ${{ github.workflow }}-${{ github.event.merge_group.base_sha || github.sha }} + group: ${{ github.workflow }}-${{ github.event.merge_group.head_sha || github.sha }} cancel-in-progress: true jobs: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1219da7a73d61..b36aba1f3108d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ on: concurrency: # `github.event.number` exists for pull requests, otherwise fall back to SHA for merge queue - group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.base_sha }} + group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }} cancel-in-progress: true env: