Skip to content

Commit ee04cae

Browse files
authored
acceptance: add photon-false pipeline test (#5434)
## Summary - Adds an acceptance test for `photon: false` on a DLT pipeline, recording the HTTP requests made by both the `terraform` and `direct` deployment engines. - Documents a bug: when `photon: false` is explicitly set, the **direct** engine correctly includes `"photon": false` in the API request, but the **terraform** engine silently omits the field (treating `false` as the default and not sending it). - Mirrors the existing `num-workers-zero` test pattern. ## Test plan - [ ] `go test ./acceptance -run TestAccept/bundle/resources/pipelines/photon-false` passes for both engine variants This pull request was AI-assisted by Isaac.
1 parent 7c4d49c commit ee04cae

14 files changed

Lines changed: 119 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
bundle:
2+
name: photon-false
3+
4+
resources:
5+
pipelines:
6+
my:
7+
name: test-pipeline
8+
photon: false
9+
libraries:
10+
- file:
11+
path: "./foo.py"

acceptance/bundle/resources/pipelines/photon-false/foo.py

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"method": "POST",
3+
"path": "/api/2.0/pipelines",
4+
"body": {
5+
"channel": "CURRENT",
6+
"deployment": {
7+
"kind": "BUNDLE",
8+
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/photon-false/default/state/metadata.json"
9+
},
10+
"edition": "ADVANCED",
11+
"libraries": [
12+
{
13+
"file": {
14+
"path": "/Workspace/Users/[USERNAME]/.bundle/photon-false/default/files/foo.py"
15+
}
16+
}
17+
],
18+
"name": "test-pipeline",
19+
"photon": false
20+
}
21+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"method": "POST",
3+
"path": "/api/2.0/pipelines",
4+
"body": {
5+
"channel": "CURRENT",
6+
"deployment": {
7+
"kind": "BUNDLE",
8+
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/photon-false/default/state/metadata.json"
9+
},
10+
"edition": "ADVANCED",
11+
"libraries": [
12+
{
13+
"file": {
14+
"path": "/Workspace/Users/[USERNAME]/.bundle/photon-false/default/files/foo.py"
15+
}
16+
}
17+
],
18+
"name": "test-pipeline"
19+
}
20+
}

acceptance/bundle/resources/pipelines/photon-false/out.test.toml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
>>> [CLI] bundle deploy
3+
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/photon-false/default/files...
4+
Deploying resources...
5+
Updating deployment state...
6+
Deployment complete!
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
trace $CLI bundle deploy
2+
print_requests.py //api/2.0/pipelines > out.requests.$DATABRICKS_BUNDLE_ENGINE.txt 2>&1
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Badness = "photon: false is not sent in the terraform deployment"
2+
Local = true
3+
Cloud = false
4+
RecordRequests = true
5+
6+
[EnvMatrix]
7+
DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
bundle:
2+
name: photon-true
3+
4+
resources:
5+
pipelines:
6+
my:
7+
name: test-pipeline
8+
photon: true
9+
libraries:
10+
- file:
11+
path: "./foo.py"

acceptance/bundle/resources/pipelines/photon-true/foo.py

Whitespace-only changes.

0 commit comments

Comments
 (0)