Skip to content
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

Explicitly set securable field when reading databricks_grants or databricks_grant #3246

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

alexott
Copy link
Contributor

@alexott alexott commented Feb 10, 2024

Changes

The read method of corresponding resources was reading only a list of permissions, but it didn't set the securable field, so when doing the import, that field was empty and this lead to the recreation of the resource after import. This PR explicitly sets that field on read.

This fixes #3245

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

…atabricks_grant`

The read method of corresponding resources was reading only a list of permissions, but it
didn't set the securable field, so when doing the import, that field was empty and this
lead to recreation of the resource after import.  This PR explicitly sets that field on
read.

This fixes #3245
@alexott alexott requested review from a team as code owners February 10, 2024 07:58
@alexott alexott requested review from tanmay-db and removed request for a team February 10, 2024 07:58
@codecov-commenter
Copy link

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (a3cc8a6) 83.77% compared to head (1be7197) 83.77%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3246      +/-   ##
==========================================
- Coverage   83.77%   83.77%   -0.01%     
==========================================
  Files         170      170              
  Lines       15177    15183       +6     
==========================================
+ Hits        12715    12719       +4     
- Misses       1717     1718       +1     
- Partials      745      746       +1     
Files Coverage Δ
catalog/resource_grant.go 80.43% <50.00%> (-1.05%) ⬇️
catalog/resource_grants.go 86.11% <50.00%> (-1.13%) ⬇️

... and 1 file with indirect coverage changes

Copy link
Contributor

@nkvuong nkvuong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@alexott alexott added this pull request to the merge queue Feb 12, 2024
Merged via the queue into main with commit 37c6c29 Feb 12, 2024
5 checks passed
@alexott alexott deleted the issue-3245-fix branch February 12, 2024 12:17
@tanmay-db tanmay-db mentioned this pull request Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ISSUE] databricks_grants and databricks_grant resources aren't imported correctly
3 participants