From 9065fd01d3f69817c095a0083dd25bbff1549372 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 20 Oct 2026 15:05:27 +0200 Subject: [PATCH 1/5] ci: skip the regression-report job when no acceptance files changed Co-authored-by: Isaac --- .github/workflows/regression-report.yml | 51 ++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression-report.yml b/.github/workflows/regression-report.yml index ba27b20a4ff..439565fb0e2 100644 --- a/.github/workflows/regression-report.yml +++ b/.github/workflows/regression-report.yml @@ -12,12 +12,61 @@ concurrency: cancel-in-progress: true jobs: - regression-report: + # The tests are selected from changes under acceptance/ (see acceptance/internal/selection), + # so a PR without any skips the expensive job. A comment left by an earlier commit that did + # change them is deleted here, as the expensive job no longer runs to do it. + changes: # Fork PRs get a read-only token and cannot comment. if: >- !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' + runs-on: ubuntu-latest + + permissions: + contents: read + pull-requests: write + + outputs: + acceptance: ${{ steps.changes.outputs.acceptance }} + + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + + - name: Detect acceptance test changes + id: changes + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: | + if [[ -n "$(git diff --name-only "$BASE_SHA...$HEAD_SHA" -- acceptance/)" ]]; then + echo "acceptance=true" >> "$GITHUB_OUTPUT" + else + echo "acceptance=false" >> "$GITHUB_OUTPUT" + fi + + - name: Delete the report comment of an earlier commit + if: ${{ steps.changes.outputs.acceptance == 'false' }} + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + with: + script: |- + const { owner, repo } = context.repo; + const comments = await github.paginate(github.rest.issues.listComments, { + owner, repo, issue_number: context.issue.number, + }); + const existing = comments.find(c => + c.user.login === 'github-actions[bot]' && c.body && c.body.startsWith('')); + if (existing) { + await github.rest.issues.deleteComment({ owner, repo, comment_id: existing.id }); + } + + regression-report: + needs: changes + if: ${{ needs.changes.outputs.acceptance == 'true' }} + runs-on: group: databricks-deco-testing-runner-group labels: ubuntu-latest-deco From a8ffe7c2b519a9cda738b40cce254ed68931947f Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 20 Oct 2026 15:15:21 +0200 Subject: [PATCH 2/5] ci: run the regression-report changes job on the runner group the org IP allow list permits Co-authored-by: Isaac --- .github/workflows/regression-report.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression-report.yml b/.github/workflows/regression-report.yml index 439565fb0e2..d741fda58b0 100644 --- a/.github/workflows/regression-report.yml +++ b/.github/workflows/regression-report.yml @@ -21,7 +21,10 @@ jobs: !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' - runs-on: ubuntu-latest + # The org's IP allow list only lets this runner group call the GitHub API. + runs-on: + group: databricks-deco-testing-runner-group + labels: ubuntu-latest-deco permissions: contents: read From a7278a8174eed88102fadbb72fc5e11aaf05358f Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 20 Oct 2026 15:36:55 +0200 Subject: [PATCH 3/5] ci: detect acceptance changes the way the test selection does Co-authored-by: Isaac --- .github/workflows/regression-report.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression-report.yml b/.github/workflows/regression-report.yml index d741fda58b0..35aa4b91a3a 100644 --- a/.github/workflows/regression-report.yml +++ b/.github/workflows/regression-report.yml @@ -39,13 +39,12 @@ jobs: with: fetch-depth: 0 + # The same diff the selection makes (see selection.FromGit): the merge commit GitHub checks + # out for the PR against its merge base with origin/main. - name: Detect acceptance test changes id: changes - env: - BASE_SHA: ${{ github.event.pull_request.base.sha }} - HEAD_SHA: ${{ github.event.pull_request.head.sha }} run: | - if [[ -n "$(git diff --name-only "$BASE_SHA...$HEAD_SHA" -- acceptance/)" ]]; then + if [[ -n "$(git diff --name-only --merge-base origin/main HEAD -- acceptance/)" ]]; then echo "acceptance=true" >> "$GITHUB_OUTPUT" else echo "acceptance=false" >> "$GITHUB_OUTPUT" From 0b822867a0e3f6bafb791aae1fde18b268150232 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 20 Oct 2026 15:39:41 +0200 Subject: [PATCH 4/5] tmp: touch selftest/basic to trigger the regression-report Co-authored-by: Isaac --- acceptance/selftest/basic/script | 1 + 1 file changed, 1 insertion(+) diff --git a/acceptance/selftest/basic/script b/acceptance/selftest/basic/script index 546d4a4b80e..417f076de39 100644 --- a/acceptance/selftest/basic/script +++ b/acceptance/selftest/basic/script @@ -36,3 +36,4 @@ trace $CLI --version touch ignored_file.txt mkdir ignored_dir touch ignored_dir/hello.txt +# tmp: trigger the regression-report From f75f00950241389950fc8fd5557949c8f5f7853f Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 20 Oct 2026 15:48:52 +0200 Subject: [PATCH 5/5] Revert "tmp: touch selftest/basic to trigger the regression-report" This reverts commit 0b822867a0e3f6bafb791aae1fde18b268150232. --- acceptance/selftest/basic/script | 1 - 1 file changed, 1 deletion(-) diff --git a/acceptance/selftest/basic/script b/acceptance/selftest/basic/script index 417f076de39..546d4a4b80e 100644 --- a/acceptance/selftest/basic/script +++ b/acceptance/selftest/basic/script @@ -36,4 +36,3 @@ trace $CLI --version touch ignored_file.txt mkdir ignored_dir touch ignored_dir/hello.txt -# tmp: trigger the regression-report