-
Notifications
You must be signed in to change notification settings - Fork 154
Added support for lifecycle.started option #4672
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
b2e6272
2cbff32
5910d1c
0c9ce97
5ea3d6a
4a61282
7fc5b46
df48e08
464c1b8
34589cf
93af424
132ead9
f9aee88
6370d81
67de29d
1e87fc5
1b59197
cb2af59
1b3d1a4
6580b5c
32480a6
db4cc35
88b4313
b0a761a
fd81054
58b5fbe
ab3fdbb
ecc3c70
90bf2d2
197b576
a596618
2d93e5f
9bf4eae
8c21f2d
7b39509
5494b19
f2b107b
96425ad
29d5c8a
b69bb16
beed2c5
fcbd2ec
b93f33f
ef5f09a
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,3 @@ | ||
| # Run the app after the deploy otherwise migrate will show the drift on the source code path. | ||
|
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. This means that users of app will also experience drift until they do "run"? Ideally we want to assert that right after deploy there is no drift. Since it's a known behavior for this field, is it possible to account for it in resources.yml or in OverrideChangeDesc? |
||
| # This happens because source code path is set remotely only after the deploy. | ||
| $CLI bundle run foo | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| bundle: | ||
| name: test-bundle-$UNIQUE_NAME | ||
|
|
||
| resources: | ||
| apps: | ||
| foo: | ||
| name: app-foo-$UNIQUE_NAME | ||
| source_code_path: ./app | ||
| lifecycle: | ||
| started: true | ||
| bar: | ||
| name: app-bar-$UNIQUE_NAME | ||
| source_code_path: ./app | ||
| lifecycle: | ||
| started: ${resources.apps.foo.lifecycle.started} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| print("Hello world\!") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| bundle: | ||
| name: test_lifecycle_started_validation | ||
|
|
||
| resources: | ||
| jobs: | ||
| my_job: | ||
| name: my_job | ||
| lifecycle: | ||
| started: true | ||
|
|
||
| apps: | ||
| my_app: | ||
| name: my_app | ||
| source_code_path: ./app | ||
| lifecycle: | ||
| started: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
|
|
||
| >>> errcode [CLI] bundle plan | ||
| Warning: unknown field: started | ||
| at resources.jobs.my_job.lifecycle | ||
| in databricks.yml:9:9 | ||
|
|
||
| create apps.my_app | ||
| create jobs.my_job | ||
|
|
||
| Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
|
|
||
| >>> errcode [CLI] bundle plan | ||
| Warning: unknown field: started | ||
| at resources.jobs.my_job.lifecycle | ||
| in databricks.yml:9:9 | ||
|
|
||
| Error: lifecycle.started is only supported in direct deployment mode | ||
| in databricks.yml:16:18 | ||
|
|
||
|
|
||
| Exit code: 1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| trace errcode $CLI bundle plan >> out.$DATABRICKS_BUNDLE_ENGINE.txt 2>&1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Ignore = [".databricks"] | ||
|
|
||
| [EnvMatrix] | ||
| DATABRICKS_BUNDLE_ENGINE = ["direct", "terraform"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| bundle: | ||
| name: test_lifecycle_started | ||
|
|
||
| resources: | ||
| jobs: | ||
| my_job: | ||
| name: my_job | ||
| lifecycle: | ||
| started: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Warning: unknown field: started | ||
andrewnester marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| at resources.jobs.my_job.lifecycle | ||
| in databricks.yml:9:9 | ||
|
|
||
| create jobs.my_job | ||
|
|
||
| Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| errcode $CLI bundle plan |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Local = true | ||
| Cloud = false | ||
|
|
||
| Ignore = [".databricks"] | ||
|
|
||
| [EnvMatrix] | ||
| DATABRICKS_BUNDLE_ENGINE = ["direct"] | ||
andrewnester marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| print("Hello world!") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| bundle: | ||
| name: config-drift-$UNIQUE_NAME | ||
|
|
||
| resources: | ||
| apps: | ||
| myapp: | ||
| name: $UNIQUE_NAME | ||
| description: my_app | ||
| source_code_path: ./app | ||
| config: | ||
| command: | ||
| - python | ||
| - app.py | ||
| env: | ||
| - name: MY_VAR | ||
| value: original_value | ||
| lifecycle: | ||
| started: true |
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.
is it expected to fail? the we should use my_app.
If it fails sometimes then I wonder what do we get from having this command in acceptance test?