Skip to content

Discourage package-level regexp and reflect work in Go style guide - #7448

Merged
pietern merged 1 commit into
init-time-dynvarfrom
init-time-style-guide
Nov 11, 2026
Merged

pietern merged 1 commit into
init-time-dynvarfrom
init-time-style-guide

Conversation

@pietern

@pietern pietern commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Adds a rule to the Go style guide: wrap regexps and reflection in sync.OnceValue instead of running them at package level, and make sure a test calls the wrapped value. This keeps agents from reintroducing what the PRs below this one removed.

This pull request and its description were written by Isaac.

Package-level initializers run on every CLI invocation, so agents
should defer such work with sync.OnceValue. The rule lives next to the
existing sync.OnceValue guidance in the Go style guide, which is loaded
for Go files only.

Co-authored-by: Isaac <no-reply@databricks.com>
@pietern
pietern added this pull request to stack #7449 November 10, 2026 15:46
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: d65faae

Run: 42848317921

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 271 15 7:14
✅​ aws-windows-latest-4core-16gb 273 13 3:39
✅​ azure linux-2core-8gb 270 15 7:15
✅​ azure-windows-latest-4core-16gb 272 13 4:01
✅​ gcp linux-2core-8gb 271 15 8:41
✅​ gcp-windows-latest-4core-16gb 273 13 5:55
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:48 gcp-windows-latest-4core-16gb TestAccept
3:43 azure-windows-latest-4core-16gb TestAccept
3:33 aws-windows-latest-4core-16gb TestAccept

@pietern
pietern marked this pull request as ready for review November 11, 2026 07:50
@pietern
pietern requested a review from a team as a code owner November 11, 2026 07:51
@pietern
pietern requested a review from rugpanov November 11, 2026 07:51
@pietern
pietern added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 3840d67 Nov 11, 2026
25 checks passed
@pietern
pietern deleted the init-time-style-guide branch November 11, 2026 10:21
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

❌ Integration test report

Commit: 3840d67

Run: 43003021714

Env ❌​FAIL 🔄​flaky ✅​pass 🙈​skip Time
❌​ aws linux-2core-8gb 4 1527 1273 147:38
❌​ aws-windows-latest-4core-16gb 4 1446 1300 159:21
❌​ azure linux-2core-8gb 4 2 1505 1281 137:22
❌​ azure-windows-latest-4core-16gb 4 1426 1308 149:56
❌​ gcp linux-2core-8gb 4 1514 1279 140:45
❌​ gcp-windows-latest-4core-16gb 4 2 1431 1306 156:52
8 interesting tests: 4 FAIL, 4 flaky
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 ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
🔄​ TestAccept/bundle/config-remote-sync/pipeline_fields ✅​p 🙈​s 🔄​f 🙈​s ✅​p 🙈​s
🔄​ TestAccept/bundle/config-remote-sync/pipeline_fields/DMS=true ✅​p 🔄​f ✅​p
❌​ TestAccept/bundle/resources/alerts/basic ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/resources/alerts/basic/DMS= ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/resources/alerts/basic/DMS=true ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
🔄​ TestAccept/bundle/resources/postgres_databases/recreate ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/postgres_databases/recreate/DMS= ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
Top 50 slowest tests (at least 2 minutes):
duration env testname
12:09 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
11:03 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
9:39 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:25 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:22 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:21 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
9:20 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:13 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:51 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
8:39 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
8:31 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:26 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:20 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
8:05 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:46 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:40 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
7:39 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:35 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
7:34 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
7:28 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:16 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
7:10 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
7:08 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
7:08 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:04 aws linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=1
6:53 aws linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
6:51 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
6:49 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
6:33 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
6:28 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
6:25 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
6:25 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
6:06 azure linux-2core-8gb TestAccept/bundle/resources/clusters/resize-terminated-fallback/DMS=true
6:03 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
6:01 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
5:57 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
5:57 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
5:56 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
5:55 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
5:51 azure linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
5:48 azure linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
5:40 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
5:38 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
5:28 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
5:14 aws-windows-latest-4core-16gb TestAccept/bundle/deploy/spark-jar-task/DMS=
5:10 aws linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=true
5:09 aws-windows-latest-4core-16gb TestAccept/bundle/deploy/spark-jar-task/DMS=true
5:04 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
4:48 gcp linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=
4:39 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true

tedjt pushed a commit to tedjt/cli that referenced this pull request Nov 12, 2026
…7484)

## Changes
Follow-up to databricks#7483. `testmask` now ignores agent config (`.agents/`,
`.claude/`, `.cursor/`, `AGENTS.md`), root docs (`README.md`,
`CHANGELOG.md`, `SECURITY.md`), GitHub issue/PR templates, and
`.nextchanges` fragments. Ignored entries support `path.Match` globs and
a trailing `/**` for directories.

## Why
PRs touching only these files (e.g. databricks#7464, databricks#7448, databricks#7344) still ran the
full test matrix. Nested READMEs are left out since many are acceptance
outputs or embedded templates.

## Tests
Added unit cases, and testmask returns `[]` for the PRs above.

This pull request and its description were written by Isaac.

---------

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants