Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions acceptance/bundle/artifacts/whl_change_version/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ dist/my_test_code-0.1.0-py3-none-any.whl
dist/my_test_code-0.2.0-py3-none-any.whl

=== Expecting 1 wheel in libraries section in /jobs/reset
>>> jq -s .[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks out.requests.txt
>>> jq -s .[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks | map({task_key, existing_cluster_id, libraries, python_wheel_task}) out.requests.txt
[
{
"task_key": "TestTask",
"existing_cluster_id": "0717-aaaaa-bbbbbb",
"libraries": [
{
Expand All @@ -75,8 +76,7 @@ dist/my_test_code-0.2.0-py3-none-any.whl
"python_wheel_task": {
"entry_point": "run",
"package_name": "my_test_code"
},
"task_key": "TestTask"
}
}
]

Expand Down Expand Up @@ -109,9 +109,10 @@ dist/my_test_code-0.1.0-py3-none-any.whl
dist/my_test_code-0.2.0-py3-none-any.whl

=== Expecting 1 wheel in libraries section in /jobs/reset
>>> jq -s .[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks out.requests.txt
>>> jq -s .[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks | map({task_key, existing_cluster_id, libraries, python_wheel_task}) out.requests.txt
[
{
"task_key": "TestTask",
"existing_cluster_id": "0717-aaaaa-bbbbbb",
"libraries": [
{
Expand All @@ -121,8 +122,7 @@ dist/my_test_code-0.2.0-py3-none-any.whl
"python_wheel_task": {
"entry_point": "run",
"package_name": "my_test_code"
},
"task_key": "TestTask"
}
}
]

Expand Down
4 changes: 2 additions & 2 deletions acceptance/bundle/artifacts/whl_change_version/script
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ trace $CLI bundle deploy
trace find.py --expect 2 whl # there are now 2 wheels on disk

title "Expecting 1 wheel in libraries section in /jobs/reset"
trace jq -s '.[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks' out.requests.txt
trace jq -s '.[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks | map({task_key, existing_cluster_id, libraries, python_wheel_task})' out.requests.txt

title "Expecting 1 wheel to be uploaded"
trace jq .path out.requests.txt | grep import | sort
Expand All @@ -31,7 +31,7 @@ trace $CLI bundle deploy
trace find.py --expect 2 whl

title "Expecting 1 wheel in libraries section in /jobs/reset"
trace jq -s '.[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks' out.requests.txt
trace jq -s '.[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks | map({task_key, existing_cluster_id, libraries, python_wheel_task})' out.requests.txt

title "Expecting 1 wheel to be uploaded"
trace jq .path out.requests.txt | grep import | sort
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,21 @@
"run_as_user_name": "[USERNAME]",
"tasks": [
{
"disabled": false,
"email_notifications": {},
"environment_key": "test_env",
"python_wheel_task": {
"entry_point": "run",
"package_name": "my_test_code"
},
"task_key": "ServerlessTestTask"
"run_if": "ALL_SUCCESS",
"task_key": "ServerlessTestTask",
"timeout_seconds": 0,
"webhook_notifications": {}
},
{
"disabled": false,
"email_notifications": {},
"existing_cluster_id": "0717-132531-5opeqon1",
"for_each_task": {
"inputs": "[1]",
Expand Down Expand Up @@ -141,7 +148,10 @@
"entry_point": "run",
"package_name": "my_test_code"
},
"task_key": "TestTask"
"run_if": "ALL_SUCCESS",
"task_key": "TestTask",
"timeout_seconds": 0,
"webhook_notifications": {}
}
],
"timeout_seconds": 0,
Expand All @@ -159,6 +169,41 @@
"new": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl",
"remote": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl"
},
"tasks[task_key='ServerlessTestTask'].disabled": {
"action": "skip",
"reason": "server_side_default",
"remote": false
},
"tasks[task_key='ServerlessTestTask'].email_notifications": {
"action": "skip",
"reason": "empty_struct",
"remote": {}
},
"tasks[task_key='ServerlessTestTask'].run_if": {
"action": "skip",
"reason": "server_side_default",
"remote": "ALL_SUCCESS"
},
"tasks[task_key='ServerlessTestTask'].timeout_seconds": {
"action": "skip",
"reason": "server_side_default",
"remote": 0
},
"tasks[task_key='ServerlessTestTask'].webhook_notifications": {
"action": "skip",
"reason": "empty_struct",
"remote": {}
},
"tasks[task_key='TestTask'].disabled": {
"action": "skip",
"reason": "server_side_default",
"remote": false
},
"tasks[task_key='TestTask'].email_notifications": {
"action": "skip",
"reason": "empty_struct",
"remote": {}
},
"tasks[task_key='TestTask'].for_each_task.task.libraries[0].whl": {
"action": "update",
"old": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl",
Expand All @@ -171,6 +216,21 @@
"new": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl",
"remote": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl"
},
"tasks[task_key='TestTask'].run_if": {
"action": "skip",
"reason": "server_side_default",
"remote": "ALL_SUCCESS"
},
"tasks[task_key='TestTask'].timeout_seconds": {
"action": "skip",
"reason": "server_side_default",
"remote": 0
},
"tasks[task_key='TestTask'].webhook_notifications": {
"action": "skip",
"reason": "empty_struct",
"remote": {}
},
"timeout_seconds": {
"action": "skip",
"reason": "server_side_default",
Expand Down
34 changes: 17 additions & 17 deletions acceptance/bundle/artifacts/whl_dynamic/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,31 @@ my_test_code-0.0.1+[UNIX_TIME_NANOS][2].dist-info/top_level.txt
my_test_code-0.0.1+[UNIX_TIME_NANOS][2].dist-info/RECORD

=== Expecting 2 patched wheels in libraries section in /jobs/reset
>>> jq -s .[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks out.requests.txt
>>> jq -s .[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks | map({task_key, existing_cluster_id, libraries, python_wheel_task, environment_key, for_each_task} | with_entries(select(.value != null))) out.requests.txt
[
{
"environment_key": "test_env",
"task_key": "ServerlessTestTask",
"python_wheel_task": {
"entry_point": "run",
"package_name": "my_test_code"
},
"task_key": "ServerlessTestTask"
"environment_key": "test_env"
},
{
"task_key": "TestTask",
"existing_cluster_id": "0717-132531-5opeqon1",
"libraries": [
{
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl"
},
{
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
}
],
"python_wheel_task": {
"entry_point": "run",
"package_name": "my_test_code"
},
"for_each_task": {
"inputs": "[1]",
"task": {
Expand All @@ -154,20 +167,7 @@ my_test_code-0.0.1+[UNIX_TIME_NANOS][2].dist-info/RECORD
},
"task_key": "SubTask"
}
},
"libraries": [
{
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl"
},
{
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
}
],
"python_wheel_task": {
"entry_point": "run",
"package_name": "my_test_code"
},
"task_key": "TestTask"
}
}
]

Expand Down
2 changes: 1 addition & 1 deletion acceptance/bundle/artifacts/whl_dynamic/script
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ title "Verify contents, it should now have new_module.py"
trace find.py --expect 1 '.databricks/.*my_test_code.*whl' | xargs ziplist.py

title "Expecting 2 patched wheels in libraries section in /jobs/reset"
trace jq -s '.[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks' out.requests.txt
trace jq -s '.[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks | map({task_key, existing_cluster_id, libraries, python_wheel_task, environment_key, for_each_task} | with_entries(select(.value != null)))' out.requests.txt

title "Expecting 2 pached wheels to be uploaded (Bad: it is currently uploaded twice)"
trace jq .path < out.requests.txt | grep import | grep whl | sort
7 changes: 6 additions & 1 deletion acceptance/bundle/deploy/experimental-python/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ Deployment complete!
},
"tasks": [
{
"disabled": false,
"email_notifications": {},
"notebook_task": {
"notebook_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files/my_notebook",
"source": "WORKSPACE"
},
"task_key": "my_notebook"
"run_if": "ALL_SUCCESS",
"task_key": "my_notebook",
"timeout_seconds": 0,
"webhook_notifications": {}
}
],
"timeout_seconds": 0,
Expand Down
7 changes: 6 additions & 1 deletion acceptance/bundle/deploy/python-notebook/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ Deployment complete!
},
"tasks": [
{
"disabled": false,
"email_notifications": {},
"notebook_task": {
"notebook_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files/my_notebook",
"source": "WORKSPACE"
},
"task_key": "my_notebook"
"run_if": "ALL_SUCCESS",
"task_key": "my_notebook",
"timeout_seconds": 0,
"webhook_notifications": {}
}
],
"timeout_seconds": 0,
Expand Down
23 changes: 20 additions & 3 deletions acceptance/bundle/migrate/basic/out.original_state.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,16 @@
"description": "",
"disable_auto_optimization": false,
"disabled": false,
"email_notifications": [],
"email_notifications": [
{
"no_alert_for_skipped_runs": false,
"on_duration_warning_threshold_exceeded": [],
"on_failure": [],
"on_start": [],
"on_streaming_backlog_exceeded": [],
"on_success": []
}
],
"environment_key": "",
"existing_cluster_id": "",
"for_each_task": [],
Expand All @@ -112,15 +121,23 @@
"power_bi_task": [],
"python_wheel_task": [],
"retry_on_timeout": false,
"run_if": "",
"run_if": "ALL_SUCCESS",
"run_job_task": [],
"spark_jar_task": [],
"spark_python_task": [],
"spark_submit_task": [],
"sql_task": [],
"task_key": "main",
"timeout_seconds": 0,
"webhook_notifications": []
"webhook_notifications": [
{
"on_duration_warning_threshold_exceeded": [],
"on_failure": [],
"on_start": [],
"on_streaming_backlog_exceeded": [],
"on_success": []
}
]
}
],
"timeout_seconds": 0,
Expand Down
32 changes: 31 additions & 1 deletion acceptance/bundle/migrate/basic/out.plan_update.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@
"run_as_user_name": "[USERNAME]",
"tasks": [
{
"disabled": false,
"email_notifications": {},
"notebook_task": {
"notebook_path": "/Workspace/Users/[USERNAME]/.bundle/migrate-basic-test/dev/files/notebook",
"source": "WORKSPACE"
},
"task_key": "main"
"run_if": "ALL_SUCCESS",
"task_key": "main",
"timeout_seconds": 0,
"webhook_notifications": {}
}
],
"timeout_seconds": 0,
Expand All @@ -70,11 +75,36 @@
"new": "Test Migrated Job",
"remote": "Test Migration Job"
},
"tasks[task_key='main'].disabled": {
"action": "skip",
"reason": "server_side_default",
"remote": false
},
"tasks[task_key='main'].email_notifications": {
"action": "skip",
"reason": "empty_struct",
"remote": {}
},
"tasks[task_key='main'].notebook_task.source": {
"action": "skip",
"reason": "server_side_default",
"remote": "WORKSPACE"
},
"tasks[task_key='main'].run_if": {
"action": "skip",
"reason": "server_side_default",
"remote": "ALL_SUCCESS"
},
"tasks[task_key='main'].timeout_seconds": {
"action": "skip",
"reason": "server_side_default",
"remote": 0
},
"tasks[task_key='main'].webhook_notifications": {
"action": "skip",
"reason": "empty_struct",
"remote": {}
},
"timeout_seconds": {
"action": "skip",
"reason": "server_side_default",
Expand Down
Loading