Skip to content

acceptance: capture testing patterns from #5414 and auto-scope to test files#5422

Merged
pietern merged 5 commits into
mainfrom
acc-testing-rules
Jun 8, 2026
Merged

acceptance: capture testing patterns from #5414 and auto-scope to test files#5422
pietern merged 5 commits into
mainfrom
acc-testing-rules

Conversation

@pietern

@pietern pietern commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Three acceptance-test idioms surfaced in #5414 review that weren't captured in .agent/rules/testing.md:

  • Prefer gron.py | grep over jq for single-value lookups.
  • Don't pass --keep to print_requests.py if a later call follows.
  • Route noisy command output to LOG.<name>&> LOG.deploy + contains.py '!panic', or 2>>LOG.<name> for cleanup stderr.

Added paths: frontmatter so the rules auto-load when Claude reads test files.

This pull request and its description were written by Isaac.

… EnvMatrix scoping

Four idioms surfaced in PR #5414 review that weren't captured in the
acceptance-test guide:

- Limit `EnvMatrix.DATABRICKS_BUNDLE_ENGINE` when the test inspects
  engine-specific state shape (resources.json vs terraform.tfstate).
- Prefer `gron.py | grep <field>` over inline `jq` for single-value
  lookups — the gron output line includes the JSON path, so the test
  log is self-explanatory.
- Don't pass `--keep` to print_requests.py if a later call follows;
  the second call re-reads the buffer and double-prints.
- Use `LOG.<name>` for cleanup-noise stderr that should show up only
  under `go test -v` (not dropped with `2>/dev/null`).

Each rule has a GOOD / BAD example and points at existing tests that
already follow the pattern.

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is June 3, 2026 11:30 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 3, 2026 11:30 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Commit: dc8ed68

Run: 27125227823

Env 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 15 261 923 6:31
🟨​ aws windows 7 15 263 921 12:30
💚​ aws-ucws linux 7 15 357 837 6:13
💚​ aws-ucws windows 7 15 359 835 9:41
💚​ azure linux 1 17 264 921 6:07
💚​ azure windows 1 17 266 919 8:27
💚​ azure-ucws linux 1 17 362 833 6:46
💚​ azure-ucws windows 1 17 364 831 9:06
💚​ gcp linux 1 17 260 924 6:38
💚​ gcp windows 1 17 262 922 9:01
22 interesting tests: 15 SKIP, 7 KNOWN
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/grants/select 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
Top 24 slowest tests (at least 2 minutes):
duration env testname
4:46 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:41 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:39 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:31 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:21 gcp windows TestAccept
3:19 azure windows TestAccept
3:16 aws-ucws windows TestAccept
3:16 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:15 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:12 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:02 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:00 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:55 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:45 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:42 azure-ucws windows TestAccept
2:41 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:39 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:39 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:37 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:36 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:36 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:34 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:29 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:23 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

pietern added 3 commits June 8, 2026 09:26
…rule

Tighten the gron-over-jq, print_requests --keep, and LOG.<name> rules
from multi-block GOOD/BAD examples to one-liners. Drop the EnvMatrix
engine-scoping rule per maintainer feedback.

Co-authored-by: Isaac
Adds path globs so the rules auto-load when Claude reads test files,
matching how .agent/rules/dresources.md auto-loads under
bundle/direct/dresources.

Co-authored-by: Isaac
…e and cleanup stderr

The dominant real-world pattern in acceptance/bundle/invariant/* is
`&> LOG.deploy` paired with `contains.py '!panic'` to keep noisy
non-deterministic output out of `output.txt` while still asserting
invariants. Cover that as the primary case, with `2>>LOG.<name>` for
cleanup-step stderr as the secondary case.

Co-authored-by: Isaac
@pietern pietern changed the title acceptance: document LOG.* files, gron.py over jq, --keep gotcha, and EnvMatrix scoping acceptance: capture testing patterns from #5414 and auto-scope to test files Jun 8, 2026
@pietern pietern temporarily deployed to test-trigger-is June 8, 2026 07:43 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 8, 2026 07:43 — with GitHub Actions Inactive
@pietern pietern requested review from denik and janniklasrose June 8, 2026 08:25
@pietern pietern temporarily deployed to test-trigger-is June 8, 2026 08:25 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 8, 2026 08:25 — with GitHub Actions Inactive
@pietern pietern enabled auto-merge June 8, 2026 08:57
@pietern pietern added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit 5dcec26 Jun 8, 2026
40 of 44 checks passed
@pietern pietern deleted the acc-testing-rules branch June 8, 2026 09:28
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.

4 participants