Skip to content

Commit

Permalink
workflows: make cockroach-microbench-ci as required
Browse files Browse the repository at this point in the history
This change aims to make `cockroach-microbench-ci` a required step.
There is an addition of a label `performance-regression-expected` that
can be used to skip the comparison in case a regression is expected

Epic: https://cockroachlabs.atlassian.net/browse/CRDB-40772
Fixes: #106661

Release note: None
  • Loading branch information
sambhav-jain-16 committed Nov 22, 2024
1 parent 6a7b1e2 commit ad92977
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/github-actions-essential-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit ad92977

Please sign in to comment.