-
Notifications
You must be signed in to change notification settings - Fork 142
Do not filter out current user from permissions list #3688
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
Conversation
14 failing tests:
|
|
Unfortunately it appears that we still to have to filter it out due to this Otherwise our default template sends permissions with 2 different levels for the current user (CAN_MANAGE and IS_OWNER) leading to the failure on GCP https://github.com/databricks-eng/eng-dev-ecosystem/actions/runs/18136388471/job/51616200179 |
Pull request was closed
## Changes Instead of removing current user from permissions and relying on terraform to add it back, we'll instead add IS_OWNER/CAN_MANAGE ourselves. Previous attempt to remove this mutator completely #3688 failed because backend complains about "ambiguous" permissions when both CAN_MANAGE and IS_OWNER are present. Thus we do additional transformation here: we upgrade CAN_MANAGE to IS_OWNER if we can. Don't apply this logic to secret scopes resource as it's not implemented via databricks_permissions resource in terraform and does not have IS_OWNER/CAN_MANAGE insertion logic. This means we no longer filter out current user permissions from secret scopes resources. ## Why - Enables direct implementation which will not do any transformations, just use whatever in the config. With this PR, the request payload will match terraform's. - Final permissions visible in 'bundle validate -o json'. ## Tests #3781
Changes
It removes the
FilterCurrentUsermutator.Why
This mutator was introduced to avoid Terraform-related issues regarding setting the permission for the user who deploys the resources (current user). Since then Terraform issue was resolved, and we don't need to filter out current users from the permission list anymore
databricks/terraform-provider-databricks#3956
Tests
Existing tests pass + manually checked that deploying with different identities for the owner works