From ff07cb0b757050c2a631ede72f7f6cb0586c4d47 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Fri, 7 Jun 2024 10:24:07 -0700 Subject: [PATCH] Guard metrics upload and report generation for fork PRs (#10080) Summary: I noticed in https://github.com/facebookincubator/velox/issues/9903 that the upload errors due to missing credentials. This PR adds a guard that allows the job to finish :heavy_check_mark: even from a fork. It will still run the upload (for testing) when the PR is from within the main repo. Pull Request resolved: https://github.com/facebookincubator/velox/pull/10080 Reviewed By: bikramSingh91 Differential Revision: D58244591 Pulled By: kevinwilfong fbshipit-source-id: e75bf84292ad046dfc85be9f1a3b813af474cf11 --- .github/workflows/build-metrics.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-metrics.yml b/.github/workflows/build-metrics.yml index 366f7a4e5e9d..12dc9715bc78 100644 --- a/.github/workflows/build-metrics.yml +++ b/.github/workflows/build-metrics.yml @@ -100,6 +100,8 @@ jobs: python3 -m pip install -r scripts/benchmark-requirements.txt - name: "Upload Metrics" + # This disables the upload and report generation on fork PRs but allows it for forks from within the main repo. + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'facebookincubator/velox' }} env: CONBENCH_URL: "https://velox-conbench.voltrondata.run/" CONBENCH_MACHINE_INFO_NAME: "GitHub-runner-${{ matrix.runner }}" @@ -118,6 +120,7 @@ jobs: "/tmp/metrics" upload-report: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'facebookincubator/velox' }} permissions: contents: write runs-on: ubuntu-latest