Skip to content

acceptance: document LOG.* files, gron.py over jq, --keep gotcha, and EnvMatrix scoping#5422

Open
pietern wants to merge 1 commit into
mainfrom
acc-testing-rules
Open

acceptance: document LOG.* files, gron.py over jq, --keep gotcha, and EnvMatrix scoping#5422
pietern wants to merge 1 commit into
mainfrom
acc-testing-rules

Conversation

@pietern
Copy link
Copy Markdown
Contributor

@pietern pietern commented Jun 3, 2026

Summary

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

  • Limit EnvMatrix.DATABRICKS_BUNDLE_ENGINE when the test inspects engine-specific state shape (resources.json vs terraform.tfstate). Cross-engine contract checks stay in a sibling test.
  • 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-descriptive.
  • Don't pass --keep to print_requests.py if a later call follows; the second call re-reads the buffer and double-prints earlier requests.
  • Use LOG.<name> for cleanup-noise stderr that should show up only under go test -v. Visible to humans debugging, but not part of the diffed output (so no spurious failures), unlike 2>/dev/null which drops the signal entirely.

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

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
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Waiting for approval

Based on git history, these people are best suited to review:

  • @denik -- recent work in .agent/rules/
  • @simonfaltum -- recent work in .agent/rules/
  • @janniklasrose -- recent work in .agent/rules/

Eligible reviewers: @andrewnester, @anton-107, @renaudhartert-db, @shreyas-goenka

Suggestions based on git history. See OWNERS for ownership rules.

@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

Commit: bc8fb15

Run: 26881881852

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.

2 participants