From d0dd9b61682dd119f899e99cae7dae67f7ec62df Mon Sep 17 00:00:00 2001 From: Carly Gundy <47304080+cgundy@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:55:18 +0200 Subject: [PATCH] fix(IDX): add BUILDEVENT_APIKEY back (#1818) The jobs were missing `BUILDEVENT_APIKEY` as `HONEYCOMB_API_TOKEN` was not correct. Checked and data is now populated in Honeycomb. --------- Co-authored-by: IDX GitHub Automation --- .github/actions/bazel-test-all/action.yaml | 8 ++++---- .github/workflows-source/ci-main.yml | 10 ++++++++-- .github/workflows-source/release-testing.yml | 8 ++++---- .github/workflows-source/schedule-daily.yml | 6 +++--- .github/workflows-source/schedule-hourly.yml | 2 +- .github/workflows/ci-main.yml | 10 ++++++++-- .github/workflows/release-testing.yml | 8 ++++---- .github/workflows/schedule-daily.yml | 6 +++--- .github/workflows/schedule-hourly.yml | 2 +- bazel/exporter/main.go | 2 +- 10 files changed, 37 insertions(+), 25 deletions(-) diff --git a/.github/actions/bazel-test-all/action.yaml b/.github/actions/bazel-test-all/action.yaml index ec6b56067ac..be8bab5fbb7 100644 --- a/.github/actions/bazel-test-all/action.yaml +++ b/.github/actions/bazel-test-all/action.yaml @@ -19,8 +19,8 @@ inputs: BAZEL_STARTUP_ARGS: required: false default: '--output_base=/var/tmp/bazel-output/' - HONEYCOMB_API_TOKEN: - required: false + BUILDEVENT_APIKEY: + required: true SSH_PRIVATE_KEY: required: false @@ -50,7 +50,7 @@ runs: ${GITHUB_WORKSPACE}/ci/bazel-scripts/main.sh BAZEL_EXIT_CODE="$?" - if [ -n "$HONEYCOMB_API_TOKEN" ] && [ -f ./bazel-bep.pb ]; then + if [ -n "$BUILDEVENT_APIKEY" ] && [ -f ./bazel-bep.pb ]; then # avoid output unless an error occurs during bes export. This ensures # only the (more relevant) output from the main bazel command is shown. exportout=$(mktemp) @@ -70,5 +70,5 @@ runs: BAZEL_STARTUP_ARGS: ${{ inputs.BAZEL_STARTUP_ARGS }} CI_PULL_REQUEST_TARGET_BRANCH_NAME: ${{ github.event.pull_request.base.ref }} MERGE_BASE_SHA: ${{ github.event.pull_request.base.sha }} - HONEYCOMB_API_TOKEN: ${{ inputs.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ inputs.BUILDEVENT_APIKEY }} SSH_PRIVATE_KEY: ${{ inputs.SSH_PRIVATE_KEY }} diff --git a/.github/workflows-source/ci-main.yml b/.github/workflows-source/ci-main.yml index 92b1d540d7f..5f936ff402e 100644 --- a/.github/workflows-source/ci-main.yml +++ b/.github/workflows-source/ci-main.yml @@ -133,7 +133,7 @@ jobs: BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" # check if PR title contains release and set timeout filters accordingly BAZEL_EXTRA_ARGS_RULES: ${{ env.BAZEL_EXTRA_ARGS_RULES || '' }} - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - <<: *bazel-bep - <<: *bazel-upload @@ -177,7 +177,7 @@ jobs: BAZEL_EXTRA_ARGS: '--test_tag_filters=test_macos' BAZEL_STARTUP_ARGS: "--output_base /var/tmp/bazel-output/${CI_RUN_ID}" BAZEL_TARGETS: "//rs/... //publish/binaries/..." - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - <<: *bazel-bep - name: Purge Bazel Output if: always() @@ -198,6 +198,7 @@ jobs: BAZEL_COMMAND: "build" BAZEL_TARGETS: "//rs/..." BAZEL_EXTRA_ARGS: "--keep_going --config=fuzzing --build_tag_filters=libfuzzer" + BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }} - <<: *bazel-bep bazel-build-fuzzers-afl: @@ -213,6 +214,7 @@ jobs: BAZEL_COMMAND: "build" BAZEL_TARGETS: "//rs/..." BAZEL_EXTRA_ARGS: "--keep_going --config=afl" + BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }} - <<: *bazel-bep python-ci-tests: @@ -345,6 +347,8 @@ jobs: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' shell: bash + env: + BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }} run: | set -eExuo pipefail buildevents cmd "$CI_RUN_ID" "$CI_JOB_NAME" build-command -- \ @@ -374,6 +378,8 @@ jobs: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' shell: bash + env: + BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }} run: | set -eExuo pipefail buildevents cmd "$CI_RUN_ID" "$CI_JOB_NAME" build-command -- \ diff --git a/.github/workflows-source/release-testing.yml b/.github/workflows-source/release-testing.yml index 27d7eee6ad1..b18c0b6ac35 100644 --- a/.github/workflows-source/release-testing.yml +++ b/.github/workflows-source/release-testing.yml @@ -91,7 +91,7 @@ jobs: BAZEL_TARGETS: "//rs/tests/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_nightly" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - <<: *bazel-bep bazel-system-test-staging: @@ -110,7 +110,7 @@ jobs: BAZEL_TARGETS: "//rs/tests/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_staging" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - <<: *bazel-bep bazel-system-test-hotfix: @@ -129,7 +129,7 @@ jobs: BAZEL_TARGETS: "//rs/tests/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS_RULES: "--test_tag_filters=system_test_hotfix" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - <<: *bazel-bep dependency-scan-release-cut: @@ -199,7 +199,7 @@ jobs: BAZEL_TARGETS: "//rs/tests/dre:guest_os_qualification" BAZEL_CI_CONFIG: "--config=systest --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS_RULES: "--test_timeout=7200 --test_env=OLD_VERSION=${{ matrix.version }}" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - <<: *bazel-bep name: Upload bazel bep for version ${{ matrix.version }} with: diff --git a/.github/workflows-source/schedule-daily.yml b/.github/workflows-source/schedule-daily.yml index b71ae095675..1cc42d9ae76 100644 --- a/.github/workflows-source/schedule-daily.yml +++ b/.github/workflows-source/schedule-daily.yml @@ -125,7 +125,7 @@ jobs: BAZEL_TARGETS: "//rs/ledger_suite/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=fi_tests_nightly --test_env=SSH_AUTH_SOCK --test_timeout=43200" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} - <<: *bazel-bep @@ -145,7 +145,7 @@ jobs: BAZEL_TARGETS: "//rs/nns/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=nns_tests_nightly --test_env=SSH_AUTH_SOCK --test_env=NNS_CANISTER_UPGRADE_SEQUENCE=all" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} - <<: *bazel-bep @@ -171,7 +171,7 @@ jobs: BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" # note: there's just one performance cluster, so the job can't be parallelized BAZEL_EXTRA_ARGS: "--test_tag_filters=system_test_benchmark --//bazel:enable_upload_perf_systest_results=True --keep_going --jobs 1" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - <<: *bazel-bep dependency-scan-nightly: diff --git a/.github/workflows-source/schedule-hourly.yml b/.github/workflows-source/schedule-hourly.yml index 95610c1ac10..94b11ef8413 100644 --- a/.github/workflows-source/schedule-hourly.yml +++ b/.github/workflows-source/schedule-hourly.yml @@ -96,7 +96,7 @@ jobs: BAZEL_TARGETS: "//rs/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_hourly" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - <<: *bazel-bep bazel-test-coverage: diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 089f234b7ce..ae0db5f9eda 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -78,7 +78,7 @@ jobs: BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" # check if PR title contains release and set timeout filters accordingly BAZEL_EXTRA_ARGS_RULES: ${{ env.BAZEL_EXTRA_ARGS_RULES || '' }} - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - name: Upload bazel-bep # runs only if previous step succeeded or failed; # we avoid collecting artifacts of jobs that were cancelled @@ -177,7 +177,7 @@ jobs: BAZEL_EXTRA_ARGS: '--test_tag_filters=test_macos' BAZEL_STARTUP_ARGS: "--output_base /var/tmp/bazel-output/${CI_RUN_ID}" BAZEL_TARGETS: "//rs/... //publish/binaries/..." - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - name: Upload bazel-bep # runs only if previous step succeeded or failed; # we avoid collecting artifacts of jobs that were cancelled @@ -222,6 +222,7 @@ jobs: BAZEL_COMMAND: "build" BAZEL_TARGETS: "//rs/..." BAZEL_EXTRA_ARGS: "--keep_going --config=fuzzing --build_tag_filters=libfuzzer" + BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }} - name: Upload bazel-bep # runs only if previous step succeeded or failed; # we avoid collecting artifacts of jobs that were cancelled @@ -261,6 +262,7 @@ jobs: BAZEL_COMMAND: "build" BAZEL_TARGETS: "//rs/..." BAZEL_EXTRA_ARGS: "--keep_going --config=afl" + BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }} - name: Upload bazel-bep # runs only if previous step succeeded or failed; # we avoid collecting artifacts of jobs that were cancelled @@ -441,6 +443,8 @@ jobs: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' shell: bash + env: + BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }} run: | set -eExuo pipefail buildevents cmd "$CI_RUN_ID" "$CI_JOB_NAME" build-command -- \ @@ -478,6 +482,8 @@ jobs: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' shell: bash + env: + BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }} run: | set -eExuo pipefail buildevents cmd "$CI_RUN_ID" "$CI_JOB_NAME" build-command -- \ diff --git a/.github/workflows/release-testing.yml b/.github/workflows/release-testing.yml index d96653c6e34..800cd1bc4ce 100644 --- a/.github/workflows/release-testing.yml +++ b/.github/workflows/release-testing.yml @@ -58,7 +58,7 @@ jobs: BAZEL_TARGETS: "//rs/tests/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_nightly" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - name: Upload bazel-bep # runs only if previous step succeeded or failed; # we avoid collecting artifacts of jobs that were cancelled @@ -107,7 +107,7 @@ jobs: BAZEL_TARGETS: "//rs/tests/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_staging" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - name: Upload bazel-bep # runs only if previous step succeeded or failed; # we avoid collecting artifacts of jobs that were cancelled @@ -155,7 +155,7 @@ jobs: BAZEL_TARGETS: "//rs/tests/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS_RULES: "--test_tag_filters=system_test_hotfix" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - name: Upload bazel-bep # runs only if previous step succeeded or failed; # we avoid collecting artifacts of jobs that were cancelled @@ -278,7 +278,7 @@ jobs: BAZEL_TARGETS: "//rs/tests/dre:guest_os_qualification" BAZEL_CI_CONFIG: "--config=systest --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS_RULES: "--test_timeout=7200 --test_env=OLD_VERSION=${{ matrix.version }}" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - # runs only if previous step succeeded or failed; # we avoid collecting artifacts of jobs that were cancelled if: success() || failure() diff --git a/.github/workflows/schedule-daily.yml b/.github/workflows/schedule-daily.yml index 8f194e9826a..44abb8891d1 100644 --- a/.github/workflows/schedule-daily.yml +++ b/.github/workflows/schedule-daily.yml @@ -104,7 +104,7 @@ jobs: BAZEL_TARGETS: "//rs/ledger_suite/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=fi_tests_nightly --test_env=SSH_AUTH_SOCK --test_timeout=43200" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} - name: Upload bazel-bep # runs only if previous step succeeded or failed; @@ -151,7 +151,7 @@ jobs: BAZEL_TARGETS: "//rs/nns/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=nns_tests_nightly --test_env=SSH_AUTH_SOCK --test_env=NNS_CANISTER_UPGRADE_SEQUENCE=all" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} - name: Upload bazel-bep # runs only if previous step succeeded or failed; @@ -204,7 +204,7 @@ jobs: BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" # note: there's just one performance cluster, so the job can't be parallelized BAZEL_EXTRA_ARGS: "--test_tag_filters=system_test_benchmark --//bazel:enable_upload_perf_systest_results=True --keep_going --jobs 1" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - name: Upload bazel-bep # runs only if previous step succeeded or failed; # we avoid collecting artifacts of jobs that were cancelled diff --git a/.github/workflows/schedule-hourly.yml b/.github/workflows/schedule-hourly.yml index ed304472326..e428bfd95ad 100644 --- a/.github/workflows/schedule-hourly.yml +++ b/.github/workflows/schedule-hourly.yml @@ -90,7 +90,7 @@ jobs: BAZEL_TARGETS: "//rs/..." BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_hourly" - HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} + BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} - name: Upload bazel-bep # runs only if previous step succeeded or failed; # we avoid collecting artifacts of jobs that were cancelled diff --git a/bazel/exporter/main.go b/bazel/exporter/main.go index 75f8075320d..169b66f6639 100644 --- a/bazel/exporter/main.go +++ b/bazel/exporter/main.go @@ -110,7 +110,7 @@ func main() { log.Printf("Using dataset %s", dataset) beeline.Init(beeline.Config{ - WriteKey: envVarOrDie("HONEYCOMB_API_TOKEN"), + WriteKey: envVarOrDie("BUILDEVENT_APIKEY"), Dataset: dataset, ServiceName: "exporter", })