Skip to content

Tighten and simplify the test-only labeler guard test - #7560

Open
denik wants to merge 2 commits into
mainfrom
denik/labeler-guard-test
Open

denik wants to merge 2 commits into
mainfrom
denik/labeler-guard-test

Conversation

@denik

@denik denik commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Follow-up to #7462, addressing post-merge review of TestLabelerTestOnlyDirsNotInBinary:

  • The test now requires exactly one rule, match type and glob in .github/labeler-test-only.yml. The labeler would OR any extra one into the label, and the test reads only one.
  • It runs go list -deps once for the host platform instead of once per release target.

Why

Before, adding a second glob would leave the guard silently incomplete.

The per-target loop added nothing. All 6 release targets give the same CLI import graph (393 packages, 2044 CLI-to-CLI import edges). The only platform-specific CLI files split by OS (unix vs Windows), and they import nothing from the CLI. CI runs this unit test on Linux, macOS and Windows, so an OS-specific import of a test-only package would still fail on the matching job.

Tests

I added each of these locally and confirmed the test fails: a second glob, a sibling match key, a second changed-files block, and a test-only entry the binary imports (libs/log/**).

This pull request and its description were written by Isaac.

Fail when the test-only-fix config grows a second rule, match type or
glob, since the test reads only one and the labeler would OR the rest in.
Read the release targets from .goreleaser.yaml instead of hardcoding them.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 1e79697

Run: 43399516412

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 270 15 6:55
💚​ aws-windows-latest-4core-16gb 1 272 13 5:09
💚​ azure linux-2core-8gb 1 269 15 6:53
💚​ azure-windows-latest-4core-16gb 1 271 13 4:35
💚​ gcp linux-2core-8gb 1 270 15 7:21
💚​ gcp-windows-latest-4core-16gb 1 272 13 4:42
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:02 aws linux-2core-8gb TestAccept
4:00 gcp linux-2core-8gb TestAccept
3:59 azure linux-2core-8gb TestAccept
3:58 aws-windows-latest-4core-16gb TestAccept
3:48 gcp-windows-latest-4core-16gb TestAccept
3:40 azure-windows-latest-4core-16gb TestAccept

@denik
denik marked this pull request as ready for review November 13, 2026 08:58
@denik
denik requested review from a team as code owners November 13, 2026 08:58
All release targets give the same CLI import graph, and the only
platform-specific CLI files import nothing from the CLI. CI runs the test
on Linux, macOS and Windows, which covers the OS-specific files, so drop
the per-target loop and the .goreleaser.yaml parsing.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik denik changed the title Harden the test-only labeler guard test Tighten and simplify the test-only labeler guard test Nov 13, 2026
@github-actions github-actions Bot added the test-only-fix PRs that update failing of flaky tests without changing CLI code. label Nov 13, 2026
@denik
denik requested a review from andrewnester November 15, 2026 08:21

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test-only-fix PRs that update failing of flaky tests without changing CLI code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants