Skip to content

Conversation

@shreyas-goenka
Copy link
Contributor

@shreyas-goenka shreyas-goenka commented Nov 5, 2025

Summary

This PR:

  1. Adds a new flag to the acceptance test framework that allows regenerating out.test.toml configuration files without running the actual tests, making it much faster to update test configurations.
  2. This PR also updates the materialized config generation to now include the Env field, which was previously not serialized. This means all out.test.toml files now capture environment variables that affect test execution.

Usage

Using Make target (recommended)

make test-regenerate-configs

Using go test directly

go test ./acceptance -run '^TestAccept$' -only-out-test-toml

For a specific test

go test ./acceptance -run '^TestAccept/bundle/debug$' -only-out-test-toml

This change adds a new flag to the acceptance test framework that allows
regenerating out.test.toml configuration files without running the actual
tests, making it much faster to update test configurations.

Changes:
- Added -only-out-test-toml flag to libs/testdiff/golden.go
- Modified acceptance test runner to skip test execution when flag is set
- Added make test-regenerate-configs rule for convenience
- Regenerated all out.test.toml files to include materialized config

The new workflow is ~100x faster than running tests with -update:
- Full test run with -update: several minutes
- Config regeneration only: ~2.5 seconds

Usage:
  make test-regenerate-configs

Or directly:
  go test ./acceptance -run '^TestAccept$' -only-out-test-toml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@shreyas-goenka shreyas-goenka changed the title Add -only-out-test-toml flag to quickly regenerate test configs Add -only-out-test-toml flag and serialize Env in materialized configs Nov 5, 2025

func init() {
flag.BoolVar(&OverwriteMode, "update", false, "Overwrite golden files")
flag.BoolVar(&OnlyOutTestTomlMode, "only-out-test-toml", false, "Only regenerate out.test.toml files without running tests")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add this flag here? It belongs to acceptance_test.go since it's only used there.

Also, can we shorter one, something easier to type? e.g. -only-out

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can we shorter one, something easier to type? e.g. -only-out

-only-out is ambigious. Does it refer to golden files or the test.toml files? I expect this to be run occasionally since this is only useful to mass update configs. For a single test, these will automatically be updated when the test is run anyways.

@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Nov 5, 2025

Run: 19106872605

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip
💚​ aws linux 1 1 356 592
💚​ aws windows 1 1 357 591
🔄​ aws-ucws linux 3 1 477 487
💚​ aws-ucws windows 1 1 480 486
💚​ azure linux 1 1 356 591
💚​ azure windows 1 1 357 590
🔄​ azure-ucws linux 3 1 473 486
💚​ azure-ucws windows 1 1 476 485
🔄​ gcp linux 10 1 1 345 593
🔄​ gcp windows 7 1 1 349 592
22 failing tests:
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 💚​R 💚​R 🔄​f 💚​R 💚​R 💚​R 🔄​f 💚​R 💚​R 💚​R
TestAccept/bundle/deployment/bind/experiment ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
TestAccept/bundle/deployment/bind/model-serving-endpoint ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
TestAccept/bundle/deployment/unbind/permissions ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
TestAccept/bundle/resources/clusters/deploy/update-after-create ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
TestAccept/bundle/resources/dashboards/change-name ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
TestAccept/bundle/resources/dashboards/change-name/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
TestAccept/bundle/resources/dashboards/simple_outside_bundle_root ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
TestAccept/bundle/resources/dashboards/simple_outside_bundle_root/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
TestAccept/bundle/resources/experiments/basic ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
TestAccept/bundle/resources/experiments/basic/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
TestAccept/bundle/resources/models/basic ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f 🔄​f
TestAccept/bundle/resources/models/basic/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
TestAccept/bundle/resources/models/basic/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
TestAccept/bundle/resources/registered_models/basic 🙈​s 🙈​s ✅​p ✅​p 🙈​s 🙈​s 🔄​f ✅​p 🙈​s 🙈​s
TestAccept/bundle/resources/registered_models/basic/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p 🔄​f ✅​p
TestAccept/bundle/resources/secret_scopes ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
TestAccept/bundle/run/app-with-job 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
TestGenerateFromExistingJobAndDeploy ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
TestFsCpFileToFile/dbfs_to_dbfs ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
TestFsCpFileToFile/dbfs_to_local ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p

@denik
Copy link
Contributor

denik commented Nov 5, 2025

Could you condense the PR description? E.g. "Example: New Env Section in out.test.toml" section is not necessary, we can see it in PR diff.

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