-
Notifications
You must be signed in to change notification settings - Fork 155
Added support for lifecycle.started option for apps #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
Merged
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
b2e6272
Added support for lifecycle.started option
andrewnester 2cbff32
fixed sche,a
andrewnester 5910d1c
some refactoring and fixed test output
andrewnester 0c9ce97
fixed python codegene
andrewnester 5ea3d6a
updated tests
andrewnester 4a61282
fixed lifecycle check
andrewnester 7fc5b46
introduce lifecyclewithstarted
andrewnester df48e08
fix test output
andrewnester 464c1b8
fix tests
andrewnester 34589cf
fixed starting clusters amnd sql warehouses
andrewnester 93af424
fix required
andrewnester 132ead9
also stop resources
andrewnester f9aee88
fixes
andrewnester 6370d81
fix schemaa test
andrewnester 67de29d
fixed tf output
andrewnester 1e87fc5
remove clusters, sql_warehouses
andrewnester 1b59197
revert clusters,sql_warehouse
andrewnester cb2af59
fix schema
andrewnester 1b3d1a4
fix + fmt
andrewnester 6580b5c
fix comment
andrewnester 32480a6
fixed output
andrewnester db4cc35
fixed app test output
andrewnester 88b4313
test app output
andrewnester b0a761a
addressed feedback
andrewnester fd81054
fix lint and test
andrewnester 58b5fbe
lint
andrewnester ab3fdbb
fixed started field
andrewnester ecc3c70
fix
andrewnester 90bf2d2
fixed lint
andrewnester 197b576
fixed drift
andrewnester a596618
Merge branch 'main' into feat/lifecycle-started
andrewnester 2d93e5f
fixed merged conflict
andrewnester 9bf4eae
fix lint
andrewnester 8c21f2d
addressed feedback
andrewnester 7b39509
added test for changing config
andrewnester 5494b19
update refschema
andrewnester f2b107b
fixed git_source test
andrewnester 96425ad
fixes
andrewnester 29d5c8a
fix lint
andrewnester b69bb16
Merge branch 'main' into feat/lifecycle-started
andrewnester beed2c5
fixed app update test
andrewnester fcbd2ec
fix for source_code_path drift
andrewnester b93f33f
fix migrate test
andrewnester ef5f09a
fix source_code_path no_drift test
andrewnester 6b34e1d
addressed feedback
andrewnester 46a6c34
bring back run call
andrewnester 8baadf2
remove post deploy hooks
andrewnester 1795ccd
moved to backend_defaults + fixes
andrewnester 9481fae
fixed the output
andrewnester d7d175a
fix truncate and resources.yml
andrewnester bf736ed
added changelog
andrewnester 395c77c
Merge branch 'main' into feat/lifecycle-started
andrewnester File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,5 +7,5 @@ Deployment complete! | |
|
|
||
| >>> [CLI] apps get app-[UNIQUE_NAME] | ||
| { | ||
| "compute_size": "MEDIUM" | ||
| "compute_size": "LARGE" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
acceptance/bundle/invariant/configs/app_lifecycle_ref.yml.tmpl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| print("Hello world\!") |
16 changes: 16 additions & 0 deletions
16
acceptance/bundle/lifecycle/started-validation/databricks.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
10 changes: 10 additions & 0 deletions
10
acceptance/bundle/lifecycle/started-validation/out.direct.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
11 changes: 11 additions & 0 deletions
11
acceptance/bundle/lifecycle/started-validation/out.terraform.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.
Oops, something went wrong.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Ignore = [".databricks"] | ||
|
|
||
| [EnvMatrix] | ||
| DATABRICKS_BUNDLE_ENGINE = ["direct", "terraform"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Warning: unknown field: started | ||
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| errcode $CLI bundle plan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| print("Hello world!") |
18 changes: 18 additions & 0 deletions
18
acceptance/bundle/resources/apps/config-drift/databricks.yml.tmpl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.