Skip to content

Commit 1f4a349

Browse files
denikclaude
andauthored
acceptance: don't apply Ignore filter to out* files (#4762)
## Summary - Inherited `Ignore` patterns (e.g. `databricks.yml` from `bundle/test.toml`) were silently swallowing output files in template tests, preventing them from being detected as new/changed and updated with `-update`. - Fix: skip the `Ignore` filter for paths starting with `"out"`, matching the existing convention for output files. - Reject (detectable) patterns starting with "out" in Ignore setting. ## Test plan - [ ] Existing acceptance tests pass - [ ] `go test ./acceptance -run TestAccept/bundle/templates/lakeflow-pipelines/python -update -v` now correctly detects and writes `output/my_lakeflow_pipelines/databricks.yml` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1560aae commit 1f4a349

File tree

33 files changed

+57
-44
lines changed

33 files changed

+57
-44
lines changed

acceptance/acceptance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ func runTest(t *testing.T,
682682
if _, ok := Ignored[relPath]; ok {
683683
continue
684684
}
685-
if config.CompiledIgnoreObject.MatchesPath(relPath) {
685+
if config.CompiledIgnoreObject.MatchesPath(relPath) && !strings.HasPrefix(relPath, "out") {
686686
continue
687687
}
688688
if strings.HasPrefix(filepath.Base(relPath), "LOG") {

acceptance/bundle/apps/compute_size/test.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Local = true
22
Cloud = true
33
RecordRequests = false
44

5-
Ignore = [".databricks", "databricks.yml", "databricks.yml.bak", "out.app-run"]
5+
Ignore = [".databricks", "databricks.yml", "databricks.yml.bak", "tmp.app-run"]
66

77
# Apps can take longer to deploy
88
TimeoutCloud = "5m"

acceptance/bundle/apps/git_source/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Deployment complete!
4141
Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
4242

4343
=== Run the app to verify it works
44-
>>> cat out.app-run
44+
>>> cat tmp.app-run
4545
✓ Getting the status of the app [APP_NAME]
4646
✓ App is in RUNNING state
4747
✓ App compute is in ACTIVE state

acceptance/bundle/apps/git_source/script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ title "Verify no drift after deployment"
2828
trace $CLI bundle plan
2929

3030
title "Run the app to verify it works"
31-
$CLI bundle run my_app &> out.app-run || true
32-
trace cat out.app-run | head -20
31+
$CLI bundle run my_app &> tmp.app-run || true
32+
trace cat tmp.app-run | head -20
3333

3434
title "Update git_source branch and redeploy"
3535
# Change branch from main to a different value (still main, but via sed to test config change)

acceptance/bundle/apps/git_source/test.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Cloud = false
55
RecordRequests = false
66
RequiresWarehouse = true
77

8-
Ignore = [".databricks", "databricks.yml", "databricks.yml.bak", "out.app-run"]
8+
Ignore = [".databricks", "databricks.yml", "databricks.yml.bak", "tmp.app-run"]
99

1010
# Apps can take longer to deploy
1111
TimeoutCloud = "5m"

acceptance/bundle/config-remote-sync/output_json/script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ r["tags"] = {"env": "test"}
1717
EOF
1818

1919
title "JSON output format"
20-
$CLI bundle config-remote-sync -o json > out.json
21-
cat out.json
20+
$CLI bundle config-remote-sync -o json > tmp.json
21+
cat tmp.json

acceptance/bundle/config-remote-sync/output_json/test.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Cloud = true
22

33
RecordRequests = false
4-
Ignore = [".databricks", "dummy.whl", "out.json", "databricks.yml"]
4+
Ignore = [".databricks", "dummy.whl", "tmp.json", "databricks.yml"]
55

66
[Env]
77
DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC = "true"

acceptance/bundle/config-remote-sync/output_no_changes/script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ $CLI bundle config-remote-sync | contains.py "No changes detected"
2020

2121
title "JSON output"
2222
echo
23-
$CLI bundle config-remote-sync -o json > out.json
24-
cat out.json
23+
$CLI bundle config-remote-sync -o json > tmp.json
24+
cat tmp.json

acceptance/bundle/config-remote-sync/output_no_changes/test.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Cloud = true
22

33
RecordRequests = false
4-
Ignore = [".databricks", "dummy.whl", "out.json", "databricks.yml"]
4+
Ignore = [".databricks", "dummy.whl", "tmp.json", "databricks.yml"]
55

66
[Env]
77
DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC = "true"

acceptance/bundle/deploy/snapshot-comparison/output.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ Updating deployment state...
2727
Deployment complete!
2828

2929
=== Normalize bundle names for comparison
30-
>>> cp bundle1/.databricks/bundle/default/resources.json out.bundle1.json
30+
>>> cp bundle1/.databricks/bundle/default/resources.json tmp.bundle1.json
3131

32-
>>> cp bundle2/.databricks/bundle/default/resources-config-sync-snapshot.json out.bundle2.json
32+
>>> cp bundle2/.databricks/bundle/default/resources-config-sync-snapshot.json tmp.bundle2.json
3333

34-
>>> update_file.py out.bundle1.json snapshot-test-1- snapshot-test-NORMALIZED-
34+
>>> update_file.py tmp.bundle1.json snapshot-test-1- snapshot-test-NORMALIZED-
3535

36-
>>> update_file.py out.bundle2.json snapshot-test-2- snapshot-test-NORMALIZED-
36+
>>> update_file.py tmp.bundle2.json snapshot-test-2- snapshot-test-NORMALIZED-
3737

3838
=== Compare normalized snapshots
39-
>>> diff.py out.bundle1.json out.bundle2.json
39+
>>> diff.py tmp.bundle1.json tmp.bundle2.json
4040

4141
=== Cleanup bundle 1
4242
>>> [CLI] bundle destroy --auto-approve

0 commit comments

Comments
 (0)