-
Notifications
You must be signed in to change notification settings - Fork 119
direct: Support configuration for unordered slices; use in permissions to ignore order #4014
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
+871
−53
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e1686d7
syntax for [task_key='mytask']
denik 8d66740
GetStructDiff new parameter
denik e44abff
fix test
denik d2ad934
wip
denik 5c278ab
wip
denik 0fb5e5b
add reorder_locally reorder_remotely
denik 5b22be2
update tests
denik a16bc2d
work around yaml formatter
denik 9ee67c5
update test
denik a6819ca
clean up; remove dq support
denik 07721eb
rename
denik f4f5496
clean up
denik 94ca23b
add a comment about key wildcard
denik 0987eab
simplify KeyFunc to drop error return; validate arguments in advance
denik 9cb6261
clean up
denik 575f2ba
remove isKeyValueKeyChar; use !isReserved
denik 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
3 changes: 0 additions & 3 deletions
3
acceptance/bundle/resources/permissions/jobs/delete_one/cloud/out.plan.direct.txt
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
acceptance/bundle/resources/permissions/jobs/delete_one/cloud/out.plan.terraform.txt
This file was deleted.
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
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 |
|---|---|---|
|
|
@@ -100,7 +100,7 @@ | |
| }, | ||
| "changes": { | ||
| "local": { | ||
| "permissions": { | ||
| "permissions[user_name='[email protected]']": { | ||
| "action": "update" | ||
| } | ||
| } | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -88,7 +88,10 @@ | |
| }, | ||
| "changes": { | ||
| "remote": { | ||
| "permissions": { | ||
| "permissions[group_name='data-team']": { | ||
| "action": "update" | ||
| }, | ||
| "permissions[user_name='[email protected]']": { | ||
| "action": "update" | ||
| } | ||
| } | ||
|
|
||
19 changes: 19 additions & 0 deletions
19
acceptance/bundle/resources/permissions/jobs/reorder_locally/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,19 @@ | ||
| bundle: | ||
| name: test-bundle | ||
|
|
||
| resources: | ||
| jobs: | ||
| foo: | ||
| name: job1 | ||
| tasks: | ||
| - task_key: main | ||
| notebook_task: | ||
| notebook_path: /Workspace/Users/[email protected]/notebook | ||
| source: WORKSPACE | ||
| permissions: | ||
| - {"level": "CAN_VIEW", "user_name": "[email protected]"} | ||
| - level: CAN_MANAGE | ||
| group_name: data-team | ||
| - level: CAN_MANAGE | ||
| service_principal_name: f37d18cd-98a8-4db5-8112-12dd0a6bfe38 | ||
| # PLACEHOLDER |
5 changes: 5 additions & 0 deletions
5
acceptance/bundle/resources/permissions/jobs/reorder_locally/out.test.toml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
acceptance/bundle/resources/permissions/jobs/reorder_locally/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,18 @@ | ||
|
|
||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| >>> [CLI] bundle plan | ||
| Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged | ||
|
|
||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| >>> [CLI] bundle plan | ||
| Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged |
7 changes: 7 additions & 0 deletions
7
acceptance/bundle/resources/permissions/jobs/reorder_locally/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,7 @@ | ||
| trace $CLI bundle deploy | ||
| update_file.py databricks.yml '- {"level": "CAN_VIEW", "user_name": "[email protected]"}' '' | ||
| update_file.py databricks.yml ' # PLACEHOLDER' '- {"level": "CAN_VIEW", "user_name": "[email protected]"}' | ||
|
|
||
| trace $CLI bundle plan | ||
| trace $CLI bundle deploy | ||
| trace $CLI bundle plan |
1 change: 1 addition & 0 deletions
1
acceptance/bundle/resources/permissions/jobs/reorder_locally/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 @@ | ||
| RecordRequests = false |
18 changes: 18 additions & 0 deletions
18
acceptance/bundle/resources/permissions/jobs/reorder_remotely/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,18 @@ | ||
| bundle: | ||
| name: test-bundle | ||
|
|
||
| resources: | ||
| jobs: | ||
| foo: | ||
| name: job1 | ||
| tasks: | ||
| - task_key: main | ||
| notebook_task: | ||
| notebook_path: /Workspace/Users/[email protected]/notebook | ||
| source: WORKSPACE | ||
| permissions: | ||
| - {"level": "CAN_VIEW", "user_name": "[email protected]"} | ||
| - level: CAN_MANAGE | ||
| group_name: data-team | ||
| - level: CAN_MANAGE | ||
| service_principal_name: f37d18cd-98a8-4db5-8112-12dd0a6bfe38 |
5 changes: 5 additions & 0 deletions
5
acceptance/bundle/resources/permissions/jobs/reorder_remotely/out.test.toml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
acceptance/bundle/resources/permissions/jobs/reorder_remotely/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,14 @@ | ||
|
|
||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| >>> [CLI] bundle plan | ||
| Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged | ||
|
|
||
| >>> [CLI] permissions set jobs [NUMID] --json @reorder.json | ||
|
|
||
| >>> [CLI] bundle plan | ||
| Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged |
8 changes: 8 additions & 0 deletions
8
acceptance/bundle/resources/permissions/jobs/reorder_remotely/reorder.json
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 @@ | ||
| { | ||
| "access_control_list": [ | ||
| {"permission_level": "CAN_MANAGE", "group_name": "data-team"}, | ||
| {"permission_level": "CAN_VIEW", "user_name": "[email protected]"}, | ||
| {"permission_level": "IS_OWNER", "user_name": "[email protected]"}, | ||
| {"permission_level": "CAN_MANAGE", "service_principal_name": "f37d18cd-98a8-4db5-8112-12dd0a6bfe38"} | ||
| ] | ||
| } |
8 changes: 8 additions & 0 deletions
8
acceptance/bundle/resources/permissions/jobs/reorder_remotely/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,8 @@ | ||
| trace $CLI bundle deploy | ||
| trace $CLI bundle plan | contains.py "2 unchanged" | ||
|
|
||
| job_id=$($CLI bundle summary --output json | jq -r '.resources.jobs.foo.id') | ||
|
|
||
| trace $CLI permissions set jobs $job_id --json @reorder.json > /dev/null | ||
|
|
||
| trace $CLI bundle plan | contains.py "2 unchanged" |
1 change: 1 addition & 0 deletions
1
acceptance/bundle/resources/permissions/jobs/reorder_remotely/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 @@ | ||
| RecordRequests = false |
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 |
|---|---|---|
|
|
@@ -96,7 +96,7 @@ | |
| }, | ||
| "changes": { | ||
| "local": { | ||
| "permissions[0].permission_level": { | ||
| "permissions[user_name='[email protected]'].permission_level": { | ||
| "action": "update" | ||
| } | ||
| } | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -76,7 +76,7 @@ | |
| }, | ||
| "changes": { | ||
| "local": { | ||
| "permissions[0].permission_level": { | ||
| "permissions[user_name='[email protected]'].permission_level": { | ||
| "action": "update" | ||
| } | ||
| } | ||
|
|
||
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
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.
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.
It seems like the implementation does not use the
stateparameter; shall it be removed?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.
good catch, cleaned up 9cb6261