-
Notifications
You must be signed in to change notification settings - Fork 179
direct: ignore UC-managed schema property defaults #5195
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
Open
janniklasrose
wants to merge
8
commits into
main
Choose a base branch
from
janniklasrose/schema-backend-defaults
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9d45d97
direct: ignore UC-managed schema properties as backend defaults
janniklasrose 1f336d8
Narrow properties
janniklasrose acc3518
direct: handle schema backend-default map drift
janniklasrose a9218c1
Merge remote-tracking branch 'origin/main' into janniklasrose/schema-…
janniklasrose 483d288
testserver: scope schema managed-defaults to the drift test
janniklasrose 6354395
Merge remote-tracking branch 'origin/main' into janniklasrose/schema-…
janniklasrose 56952a7
Factor out asNonEmptyStringMap inside matchesBackendDefaultMap
janniklasrose 66711bf
Factor out matchesAnyBackendDefault and use in both places
janniklasrose 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
8 changes: 8 additions & 0 deletions
8
acceptance/bundle/resources/schemas/drift/managed_properties/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,8 @@ | ||
| bundle: | ||
| name: test-bundle | ||
|
|
||
| resources: | ||
| schemas: | ||
| schema1: | ||
| name: schema_managed_defaults | ||
| catalog_name: main |
3 changes: 3 additions & 0 deletions
3
acceptance/bundle/resources/schemas/drift/managed_properties/out.test.toml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
acceptance/bundle/resources/schemas/drift/managed_properties/output.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,24 @@ | ||
|
|
||
| === Initial deployment | ||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| === Plan is a no-op despite UC auto-populating managed properties | ||
| >>> [CLI] bundle plan | ||
| Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged | ||
|
|
||
| === Redeploy is a no-op (no UpdateSchema call) | ||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| >>> print_requests.py //unity | ||
| json.method = "POST"; | ||
| json.path = "/api/2.1/unity-catalog/schemas"; | ||
| json.body.catalog_name = "main"; | ||
| json.body.name = "schema_managed_defaults"; |
11 changes: 11 additions & 0 deletions
11
acceptance/bundle/resources/schemas/drift/managed_properties/script
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 @@ | ||
| echo "*" > .gitignore | ||
|
|
||
| title "Initial deployment" | ||
| trace $CLI bundle deploy | ||
|
|
||
| title "Plan is a no-op despite UC auto-populating managed properties" | ||
| trace $CLI bundle plan | contains.py "Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged" | ||
|
|
||
| title "Redeploy is a no-op (no UpdateSchema call)" | ||
| trace $CLI bundle deploy | ||
| trace print_requests.py //unity | gron.py | contains.py '!json.method = "PATCH"' |
5 changes: 5 additions & 0 deletions
5
acceptance/bundle/resources/schemas/drift/managed_properties/test.toml
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,5 @@ | ||
| RecordRequests = true | ||
|
|
||
| # Terraform issues a spurious PATCH for enable_predictive_optimization on every | ||
| # deploy, which is outside the scope of backend-default handling in resources.yml. | ||
| EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] |
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
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
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.
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.
not great to use a magic name here, but this is similar to the backend which doesn't do this based on any API parameter either