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

Added support for binding storage credentials and external locations to specific workspaces #3678

Merged
merged 12 commits into from
Jul 3, 2024

Conversation

nkvuong
Copy link
Contributor

@nkvuong nkvuong commented Jun 17, 2024

Changes

  • Added support for 2 additional securable_type: external-location and storage-credential

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

@nkvuong nkvuong requested review from a team as code owners June 17, 2024 09:21
@nkvuong nkvuong requested review from tanmay-db and removed request for a team June 17, 2024 09:21
@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 86.71329% with 19 lines in your changes missing coverage. Please review.

Project coverage is 81.65%. Comparing base (d7343a5) to head (6163c7e).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3678      +/-   ##
==========================================
+ Coverage   81.60%   81.65%   +0.05%     
==========================================
  Files         196      198       +2     
  Lines       19741    19729      -12     
==========================================
+ Hits        16109    16110       +1     
+ Misses       2672     2659      -13     
  Partials      960      960              
Files Coverage Δ
catalog/resource_catalog.go 76.57% <100.00%> (+5.04%) ⬆️
catalog/resource_catalog_workspace_binding.go 100.00% <100.00%> (+14.15%) ⬆️
catalog/resource_external_location.go 78.26% <100.00%> (ø)
catalog/utils.go 100.00% <100.00%> (ø)
provider/provider.go 93.99% <100.00%> (+0.02%) ⬆️
catalog/resource_storage_credential.go 61.01% <75.00%> (ø)
catalog/bindings/bindings.go 87.50% <87.50%> (ø)
catalog/resource_workspace_binding.go 85.18% <85.18%> (ø)

@nkvuong
Copy link
Contributor Author

nkvuong commented Jun 17, 2024

integration tests passed. failed tests are unrelated

@nkvuong nkvuong requested a review from alexott June 17, 2024 13:01
@nkvuong nkvuong force-pushed the feature/workspace_binding branch from b45ad7f to 658f17d Compare June 25, 2024 09:00
Copy link
Contributor

@edwardfeng-db edwardfeng-db left a comment

Choose a reason for hiding this comment

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

Thanks @nkvuong. Overall looks good, but I'm wondering if it's possible to break this PR into several smaller PRs to increase our confidence?

I see that you are doing some refactoring by extracting common logic out. Can we separate that as the first step? Then we do the migration?

@nkvuong
Copy link
Contributor Author

nkvuong commented Jun 25, 2024

Thanks @nkvuong. Overall looks good, but I'm wondering if it's possible to break this PR into several smaller PRs to increase our confidence?

I see that you are doing some refactoring by extracting common logic out. Can we separate that as the first step? Then we do the migration?

Added 3 separate PRs for refactor, renaming of resource & struct updates

Will rebase this once those are merged

@nkvuong nkvuong force-pushed the feature/workspace_binding branch from 26d3fde to 3114781 Compare July 2, 2024 16:58
@alexott alexott added this pull request to the merge queue Jul 3, 2024
Merged via the queue into main with commit 75236a6 Jul 3, 2024
5 checks passed
@alexott alexott deleted the feature/workspace_binding branch July 3, 2024 07:54
tanmay-db added a commit that referenced this pull request Jul 9, 2024
### Internal Changes

 * Add Release tag ([#3748](#3748)).
 * Improve Changelog by grouping changes ([#3747](#3747)).
 * Upgrade Go SDK to v0.43.2 ([#3750](#3750)).

### Other Changes

 * Add `databricks_schema` data source ([#3732](#3732)).
 * Add new APIErrorBody struct and update deps ([#3745](#3745)).
 * Added support for binding storage credentials and external locations to specific workspaces ([#3678](#3678)).
 * Adds `databricks_volume` as data source  ([#3211](#3211)).
 * Change TF registry ownership ([#3736](#3736)).
 * Exporter: Emit directories during the listing only if they are explicitly configured in `-listing` ([#3673](#3673)).
 * Exporter: export libraries specified as `requirements.txt` ([#3649](#3649)).
 * Exporter: fix generation of `run_as` blocks in `databricks_job` ([#3724](#3724)).
 * Exporter: use Go SDK structs for `databricks_job` resource ([#3727](#3727)).
 * Fix invalid priviledges in grants.md ([#3716](#3716)).
 * Make the schedule.pause_status field read-only ([#3692](#3692)).
 * Refactored `databricks_cluster(s)` data sources to Go SDK ([#3685](#3685)).
 * Renamed `databricks_catalog_workspace_binding` to `databricks_workspace_binding` ([#3703](#3703)).
 * Run goreleaser action in snapshot mode from merge queue ([#3646](#3646)).
 * Update cluster.md: add data_security_mode parameters `NONE` and `NO_ISOLATION` ([#3740](#3740)).
 * Upgrade databricks-sdk-go ([#3743](#3743)).
 * remove references to basic auth ([#3720](#3720)).
@tanmay-db tanmay-db mentioned this pull request Jul 9, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jul 19, 2024
## 1.49.0

### New Features and Improvements
* Added `databricks_dashboard` resource
([#3729](#3729)).
* Added `databricks_schema` data source
([#3732](#3732)).
* Added support for binding storage credentials and external locations
to specific workspaces
([#3678](#3678)).
* Added `databricks_volume` as data source
([#3211](#3211)).
* Make the `schedule.pause_status` field read-only
([#3692](#3692)).
* Renamed `databricks_catalog_workspace_binding` to
`databricks_workspace_binding`
([#3703](#3703)).
* Make `cluster_name_contains` optional in `databricks_clusters` data
source
([#3760](#3760)).
* Tolerate OAuth errors in databricks_mws_workspaces when managing
tokens
([#3761](#3761)).
* Permissions for `databricks_dashboard` resource
([#3762](#3762)).

### Exporter
* Emit directories during the listing only if they are explicitly
configured in `-listing`
([#3673](#3673)).
* Export libraries specified as `requirements.txt`
([#3649](#3649)).
* Fix generation of `run_as` blocks in `databricks_job`
([#3724](#3724)).
* Use Go SDK structs for `databricks_job` resource
([#3727](#3727)).
* Clarify use of `-listing` and `-services` options
([#3755](#3755)).
* Improve code generation for SQL Endpoints
([#3764](#3764))

### Documentation
* Fix invalid priviledges in grants.md
([#3716](#3716)).
* Update cluster.md: add data_security_mode parameters `NONE` and
`NO_ISOLATION`
([#3740](#3740)).
* Remove references to basic auth
([#3720](#3720)).
* Update resources diagram
([#3765](#3765)).

### Internal Changes
* Add Release tag
([#3748](#3748)).
* Improve Changelog by grouping changes
([#3747](#3747)).
* Change TF registry ownership
([#3736](#3736)).
* Refactored `databricks_cluster(s)` data sources to Go SDK
([#3685](#3685)).
* Upgrade databricks-sdk-go
([#3743](#3743)).
* Run goreleaser action in snapshot mode from merge queue
([#3646](#3646)).
* Make `dashboard_name` random in integration tests for
`databricks_dashboard` resource
([#3763](#3763)).
* Clear stale go.sum values
([#3768](#3768)).
* Add "Owner" tag to test cluster in acceptance test
([#3771](#3771)).
* Fix integration test for restrict workspace admins setting
([#3772](#3772)).
* Add "Owner" tag to test SQL endpoint in acceptance test
([#3774](#3774)).
* Move PR message validation to a separate workflow
([#3777](#3777)).
* Trigger the validate workflow in the merge queue
([#3782](#3782)).
* Update properties for managed SQL table on latest DBR
([#3784](#3784)).
* Add "Owner" tag to test SQL endpoint in acceptance test
([#3785](#3785)).
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.

4 participants