Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(IDX): add BUILDEVENT_APIKEY back #1818

Merged
merged 15 commits into from
Oct 3, 2024
8 changes: 4 additions & 4 deletions .github/actions/bazel-test-all/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
basvandijk marked this conversation as resolved.
Show resolved Hide resolved
# 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)
Expand All @@ -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 }}
10 changes: 8 additions & 2 deletions .github/workflows-source/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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()
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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 -- \
Expand Down Expand Up @@ -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 -- \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows-source/release-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows-source/schedule-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows-source/schedule-hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 -- \
Expand Down Expand Up @@ -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 -- \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/schedule-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schedule-hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bazel/exporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
})
Expand Down
Loading