-
Notifications
You must be signed in to change notification settings - Fork 206
internal: Refactor immutable folder upload as an internal resource in direct engine #6084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
84608d6
a5ab287
4a0d4bd
c869f1d
aa73e34
b4f272f
f31a466
5943979
195974d
b6bb79f
2b7b48f
54a7dc0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| *.txt | ||
| *.json |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,13 +6,31 @@ cleanup() { | |
| trap cleanup EXIT | ||
|
|
||
| trace $CLI bundle validate | ||
| trace $CLI bundle deploy | ||
| trace $CLI bundle plan -o json > plan.json | ||
| trace jq '.plan["resources.jobs.my_job"].new_state.value.tasks' plan.json | ||
| trace jq '.plan["resources.snapshots.immutable"]' plan.json | ||
|
|
||
| trace $CLI bundle deploy | ||
|
|
||
| # Get a job and check that task paths point into the snapshot | ||
| JOB_ID=$($CLI bundle summary -o json | jq -r '.resources.jobs.my_job.id') | ||
| trace $CLI jobs get $JOB_ID | jq '.settings.tasks' | jq '.[] | select(.spark_python_task != null) | .spark_python_task.python_file' | ||
| trace $CLI jobs get $JOB_ID | jq '.settings.tasks' | jq '.[] | select(.notebook_task != null) | .notebook_task.notebook_path' | ||
| trace $CLI jobs get $JOB_ID | jq '.settings.tasks' | jq '.[] | select(.notebook_task != null) | .notebook_task.base_parameters.path' | ||
| PYTHON_FILE_1=$($CLI jobs get $JOB_ID | jq '.settings.tasks' | jq '.[] | select(.spark_python_task != null) | .spark_python_task.python_file') | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can store "jobs get" output and query it multiple times - would matter if we run this test on Cloud. |
||
|
|
||
| trace title "Check snapshot plan after deploy" | ||
| trace $CLI bundle plan -o json > plan.json | ||
| trace jq '.plan["resources.snapshots.immutable"]' plan.json | ||
| rm plan.json | ||
|
|
||
| trace $CLI bundle deploy | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you read EnvMatrix.READPLAN here for serialized plan? This is good at catching issues with implicit state transfer. |
||
|
|
||
| PYTHON_FILE_2=$($CLI jobs get $JOB_ID | jq '.settings.tasks' | jq '.[] | select(.spark_python_task != null) | .spark_python_task.python_file') | ||
| if [ "$PYTHON_FILE_1" == "$PYTHON_FILE_2" ]; then | ||
| echo "\nSnapshot did not change as expected" | ||
| else | ||
| echo "\nSnapshot changed" | ||
| exit 1 | ||
| fi | ||
| trace $CLI bundle destroy --auto-approve | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: \n is printed verbatim rather than as newline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, is this expected "Snapshot did not change as expected"?