From 812d39a109989c510545929c5d6646ddf947ace1 Mon Sep 17 00:00:00 2001 From: Scott Gerring Date: Wed, 23 Apr 2025 14:54:39 +0200 Subject: [PATCH 1/6] force shared worker run --- .github/workflows/benchmark.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 8544abef39..abc30d8e36 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -25,10 +25,10 @@ jobs: # If we're running on a PR, use ubuntu-latest - a shared runner. We can't use the self-hosted # runners on arbitrary PRs, and we don't want to unleash that load on the pool anyway. # If we're running on main, use the OTEL self-hosted runner pool. - - # TODO - temporarily move main to the shared workers, until we've resolved the instance setup issue + + # TODO - temporarily use self-hosted to get shared-worker environment going + runs-on: 'self-hosted' # runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'self-hosted' }} - runs-on: 'ubuntu-latest' if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'performance')) || github.event_name == 'push' }} env: # For PRs, compare against the base branch - e.g., 'main'. From 55f81d05d0311b63ad389e86902025698cb1be12 Mon Sep 17 00:00:00 2001 From: Scott Gerring Date: Wed, 23 Apr 2025 14:55:15 +0200 Subject: [PATCH 2/6] bump --- .github/workflows/benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index abc30d8e36..edd6882bab 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -25,7 +25,7 @@ jobs: # If we're running on a PR, use ubuntu-latest - a shared runner. We can't use the self-hosted # runners on arbitrary PRs, and we don't want to unleash that load on the pool anyway. # If we're running on main, use the OTEL self-hosted runner pool. - + # # TODO - temporarily use self-hosted to get shared-worker environment going runs-on: 'self-hosted' # runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'self-hosted' }} From 5d8879c7e34ec363fd9e5f3b01d21da392765d57 Mon Sep 17 00:00:00 2001 From: Scott Gerring Date: Wed, 23 Apr 2025 19:54:58 +0200 Subject: [PATCH 3/6] :prayers: --- .github/workflows/benchmark.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index edd6882bab..c7f3349c68 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -12,6 +12,7 @@ on: push: branches: - main + - dependabot/scottgerring/benchmark-fix name: benchmark pull requests permissions: contents: read From 5bec647f14e3b1acda82b0279ba3ea0652608868 Mon Sep 17 00:00:00 2001 From: Scott Gerring Date: Thu, 24 Apr 2025 07:52:05 +0200 Subject: [PATCH 4/6] Let's try guess where unzip is --- .github/workflows/benchmark.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index c7f3349c68..7c74b06df4 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -44,6 +44,26 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 10 # Fetch current commit and its parent + + - name: Detect OS and attempt unzip installation + run: | + echo "Detecting OS..." + if [ -f /etc/os-release ]; then + . /etc/os-release + echo "Detected OS: $NAME ($ID)" + else + echo "/etc/os-release not found – cannot detect OS" + fi + + echo "Trying to install unzip..." + sudo apt-get update && sudo apt-get install -y unzip || \ + sudo yum install -y unzip || \ + sudo dnf install -y unzip || \ + sudo pacman -Sy --noconfirm unzip || \ + sudo apk add unzip || \ + sudo zypper install -y unzip || \ + true + - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} From 670112756b819f8c2310cc0833bab1138fd83450 Mon Sep 17 00:00:00 2001 From: Scott Gerring Date: Thu, 24 Apr 2025 07:55:55 +0200 Subject: [PATCH 5/6] maybe protocs already there? --- .github/workflows/benchmark.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 7c74b06df4..a3fbe60c60 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -64,9 +64,9 @@ jobs: sudo zypper install -y unzip || \ true - - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 + # with: + # repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 with: toolchain: stable From 9aa6bc536c4ab555eba1d3864e9453cb5aae930a Mon Sep 17 00:00:00 2001 From: Scott Gerring Date: Thu, 24 Apr 2025 08:04:32 +0200 Subject: [PATCH 6/6] try docker it --- .github/workflows/benchmark.yml | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index a3fbe60c60..3d25af619c 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -45,25 +45,19 @@ jobs: with: fetch-depth: 10 # Fetch current commit and its parent - - name: Detect OS and attempt unzip installation + - name: Run benchmark inside Docker run: | - echo "Detecting OS..." - if [ -f /etc/os-release ]; then - . /etc/os-release - echo "Detected OS: $NAME ($ID)" - else - echo "/etc/os-release not found – cannot detect OS" - fi - - echo "Trying to install unzip..." - sudo apt-get update && sudo apt-get install -y unzip || \ - sudo yum install -y unzip || \ - sudo dnf install -y unzip || \ - sudo pacman -Sy --noconfirm unzip || \ - sudo apk add unzip || \ - sudo zypper install -y unzip || \ - true - + docker run --rm \ + -v "$PWD":/workspace \ + -w /workspace \ + rust:slim-bullseye \ + bash -c " + apt-get update && apt-get install -y unzip cmake build-essential pkg-config curl git && \ + cargo install cargo-criterion && \ + cargo bench && \ + echo 'Benchmark run complete inside Docker container' + " + # - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 # with: # repo-token: ${{ secrets.GITHUB_TOKEN }}