diff --git a/.github/bors.toml b/.github/bors.toml index df6be85c433a..27de455a1a27 100644 --- a/.github/bors.toml +++ b/.github/bors.toml @@ -17,6 +17,7 @@ status = [ "macos_arm64_build", "unit_tests", "windows_build", + "cockroach-microbench-ci", ] # List of commit statuses that must not be failing on the PR commit when it is diff --git a/.github/workflows/github-actions-essential-ci.yml b/.github/workflows/github-actions-essential-ci.yml index 02c6f11699e2..2c1a33de05ec 100644 --- a/.github/workflows/github-actions-essential-ci.yml +++ b/.github/workflows/github-actions-essential-ci.yml @@ -376,6 +376,24 @@ jobs: ref: ${{ github.event.pull_request.head.sha || github.ref }} - name: compute metadata run: echo GITHUB_ACTIONS_BRANCH=${{ github.event.pull_request.number || github.ref_name}} >> "$GITHUB_ENV" + - name: Check for 'performance-regression-expected' label + uses: actions/github-script@v6 + with: + script: | + const labelToCheck = 'performance-regression-expected'; // Replace with your label + const { owner, repo } = context.repo; + const issue_number = context.payload.pull_request.number; + const labels = await github.rest.issues.listLabelsOnIssue({ + owner, + repo, + issue_number + }); + const labelNames = labels.data.map(label => label.name); + if (!labelNames.includes(labelToCheck)) { + core.setFailed(`The label "${labelToCheck}" is not present on this pull request.`); + } else { + console.log(`The label "${labelToCheck}" is present on this pull request.`); + } - run: ./build/github/get-engflow-keys.sh - run: ./build/github/prepare-summarize-build.sh - name: run scripts @@ -384,9 +402,7 @@ jobs: COMPARE_THRESHOLD: "20.00" PUSH_STEP: ${{ github.event_name == 'push' && env.GITHUB_ACTIONS_BRANCH != 'staging' }} BASE_SHA: ${{ steps.get_latest_commit_target_branch.outputs.latest_commit }} - - # TODO(sambhav-jain-16): add Performance note check and use this flag. Currently set to false (https://github.com/cockroachdb/cockroach/issues/106661) - SKIP_COMPARISON: ${{ env.GITHUB_ACTIONS_BRANCH == 'staging' }} + SKIP_COMPARISON: ${{ env.GITHUB_ACTIONS_BRANCH == 'staging' && env.PERF_REGRESSION }} - name: upload build results run: ./build/github/summarize-build.sh bes.bin if: always()