Skip to content

Commit

Permalink
chore(IDX): unset buildevent var (#3629)
Browse files Browse the repository at this point in the history
Remove the use of honeycomb for buildevents. Use it still for exporting
build events of `bazel-test-all` until superset is offered to
developers.

---------

Co-authored-by: IDX GitHub Automation <[email protected]>
  • Loading branch information
marko-k0 and IDX GitHub Automation authored Jan 27, 2025
1 parent 5c68a63 commit b9ee50e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 34 deletions.
10 changes: 9 additions & 1 deletion .github/actions/bazel-test-all/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inputs:
required: false
default: '--output_base=/var/tmp/bazel-output/'
BUILDEVENT_APIKEY:
required: true
required: false
SSH_PRIVATE_KEY:
required: false

Expand All @@ -39,9 +39,16 @@ runs:
echo -e "Host *\nUser github-runner\n" > ~/.ssh/config
fi
# unset honeycomb api key but use it latter for exporter
# TODO: remove exporter when users can use superset
KEY=${BUILDEVENT_APIKEY:-""}
unset BUILDEVENT_APIKEY
${GITHUB_WORKSPACE}/ci/bazel-scripts/main.sh
BAZEL_EXIT_CODE="$?"
export BUILDEVENT_APIKEY="$KEY"
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.
Expand All @@ -51,6 +58,7 @@ runs:
cat "$exportout"
fi
rm "$exportout"
echo "BEP events exported to honeycomb!"
fi
# output node name to gihub step summary
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows-source/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ 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/..."
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }}
- name: Purge Bazel Output
if: always()
shell: bash
Expand All @@ -219,7 +218,6 @@ 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-build-fuzzers-afl:
name: Bazel Build Fuzzers AFL
Expand All @@ -233,7 +231,6 @@ jobs:
BAZEL_COMMAND: "build"
BAZEL_TARGETS: "//rs/..."
BAZEL_EXTRA_ARGS: "--keep_going --config=afl"
BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }}

python-ci-tests:
name: Python CI Tests
Expand Down Expand Up @@ -279,13 +276,11 @@ jobs:
rm -rf "/cache/job/${CI_JOB_NAME}/${CI_RUN_ID}"
mkdir -p "/cache/job/${CI_JOB_NAME}/${CI_RUN_ID}/artifacts"
ln -s "/cache/job/${CI_JOB_NAME}/${CI_RUN_ID}/artifacts" /__w/$REPO_NAME/$REPO_NAME/artifacts
buildevents cmd "$CI_RUN_ID" "$CI_JOB_NAME" build-command -- \
"$CI_PROJECT_DIR"/ci/scripts/run-build-ic.sh
"$CI_PROJECT_DIR"/ci/scripts/run-build-ic.sh
rm -rf "/cache/job/${CI_JOB_NAME}/${CI_RUN_ID}"
env:
BAZEL_COMMAND: "build"
MERGE_BASE_SHA: ${{ github.event.pull_request.base.sha }}
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }}
BRANCH_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
RUN_ON_DIFF_ONLY: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'CI_ALL_BAZEL_TARGETS') }}
- name: Upload build-ic.tar
Expand Down Expand Up @@ -374,13 +369,10 @@ jobs:
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch'
shell: bash
env:
BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }}
run: |
set -eExuo pipefail
export CARGO_TERM_COLOR=always # ensure output has colors
buildevents cmd "$CI_RUN_ID" "$CI_JOB_NAME" build-command -- \
"$CI_PROJECT_DIR"/ci/scripts/rust-lint.sh
"$CI_PROJECT_DIR"/ci/scripts/rust-lint.sh
cargo-build-release-linux:
name: Cargo Build Release Linux
Expand Down Expand Up @@ -408,10 +400,7 @@ jobs:
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch'
shell: bash
env:
BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }}
run: |
set -eExuo pipefail
export CARGO_TERM_COLOR=always # ensure output has colors
buildevents cmd "$CI_RUN_ID" "$CI_JOB_NAME" build-command -- \
cargo build --release --locked
cargo build --release --locked
17 changes: 3 additions & 14 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ 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/..."
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }}
- name: Purge Bazel Output
if: always()
shell: bash
Expand All @@ -195,7 +194,6 @@ 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-build-fuzzers-afl:
name: Bazel Build Fuzzers AFL
runs-on:
Expand All @@ -217,7 +215,6 @@ jobs:
BAZEL_COMMAND: "build"
BAZEL_TARGETS: "//rs/..."
BAZEL_EXTRA_ARGS: "--keep_going --config=afl"
BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }}
python-ci-tests:
name: Python CI Tests
runs-on:
Expand Down Expand Up @@ -282,13 +279,11 @@ jobs:
rm -rf "/cache/job/${CI_JOB_NAME}/${CI_RUN_ID}"
mkdir -p "/cache/job/${CI_JOB_NAME}/${CI_RUN_ID}/artifacts"
ln -s "/cache/job/${CI_JOB_NAME}/${CI_RUN_ID}/artifacts" /__w/$REPO_NAME/$REPO_NAME/artifacts
buildevents cmd "$CI_RUN_ID" "$CI_JOB_NAME" build-command -- \
"$CI_PROJECT_DIR"/ci/scripts/run-build-ic.sh
"$CI_PROJECT_DIR"/ci/scripts/run-build-ic.sh
rm -rf "/cache/job/${CI_JOB_NAME}/${CI_RUN_ID}"
env:
BAZEL_COMMAND: "build"
MERGE_BASE_SHA: ${{ github.event.pull_request.base.sha }}
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }}
BRANCH_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
RUN_ON_DIFF_ONLY: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'CI_ALL_BAZEL_TARGETS') }}
- name: Upload build-ic.tar
Expand Down Expand Up @@ -383,13 +378,10 @@ jobs:
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch'
shell: bash
env:
BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }}
run: |
set -eExuo pipefail
export CARGO_TERM_COLOR=always # ensure output has colors
buildevents cmd "$CI_RUN_ID" "$CI_JOB_NAME" build-command -- \
"$CI_PROJECT_DIR"/ci/scripts/rust-lint.sh
"$CI_PROJECT_DIR"/ci/scripts/rust-lint.sh
cargo-build-release-linux:
name: Cargo Build Release Linux
container:
Expand Down Expand Up @@ -421,10 +413,7 @@ jobs:
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch'
shell: bash
env:
BUILDEVENT_APIKEY: ${{ secrets. HONEYCOMB_API_TOKEN }}
run: |
set -eExuo pipefail
export CARGO_TERM_COLOR=always # ensure output has colors
buildevents cmd "$CI_RUN_ID" "$CI_JOB_NAME" build-command -- \
cargo build --release --locked
cargo build --release --locked
4 changes: 0 additions & 4 deletions .github/workflows/system-tests-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ env:
CI_PIPELINE_SOURCE: ${{ github.event_name }}
CI_PROJECT_DIR: ${{ github.workspace }}
CI_RUN_ID: ${{ github.run_id }}
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }}
BUILDEVENT_DATASET: "github-ci-dfinity"

jobs:
system-tests-k8s:
Expand Down Expand Up @@ -89,7 +87,6 @@ jobs:
BAZEL_TARGETS: "${{ env.TARGETS }}"
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
BAZEL_EXTRA_ARGS: "--local_test_jobs=${{ env.JOBS }} --test_tag_filters=k8s,-manual,-colocated,-long_test,-system_test_hourly,-system_test_nightly --k8s"
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }}

system-tests-k8s-hourly:
name: System Tests K8s Hourly
Expand Down Expand Up @@ -147,4 +144,3 @@ jobs:
BAZEL_TARGETS: "${{ env.TARGETS }}"
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
BAZEL_EXTRA_ARGS: "--local_test_jobs=${{ env.JOBS }} --test_tag_filters=k8s --k8s --flaky_test_attempts=3"
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }}
2 changes: 1 addition & 1 deletion ci/bazel-scripts/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ stream_awk_program='

# shellcheck disable=SC2086
# ${BAZEL_...} variables are expected to contain several arguments. We have `set -f` set above to disable globbing (and therefore only allow splitting)"
buildevents cmd "${CI_RUN_ID}" "${CI_JOB_NAME}" "${CI_JOB_NAME}-bazel-cmd" -- bazel \
bazel \
${BAZEL_STARTUP_ARGS} \
${BAZEL_COMMAND} \
--color=yes \
Expand Down

0 comments on commit b9ee50e

Please sign in to comment.