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

Remove dependency to "internal" SDK's struct APIErrorBody #3745

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

renaudhartert-db
Copy link
Contributor

@renaudhartert-db renaudhartert-db commented Jul 9, 2024

Changes

Despite being technically public, struct APIErrorBody is an internal struct of the Go SDK as it is only used in private functions and not meant to be used outside of its package. Actually, the struct has been entirely removed in PR 960 to make that explicit.

This PR cuts the dependency to the SDK APIErrorBody by adding a copy of the struct in the common package. That new struct is ultimately meant to disappear as the Terraform provider is migrated to use the service clients provided by the SDK rather than calling the services directly.

For Reviewers: the main change is in common/apierr.go all other changes are simple dependency updates.

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

@renaudhartert-db renaudhartert-db marked this pull request as ready for review July 9, 2024 09:43
@renaudhartert-db renaudhartert-db requested review from a team as code owners July 9, 2024 09:43
@renaudhartert-db renaudhartert-db requested review from tanmay-db and removed request for a team July 9, 2024 09:43
@tanmay-db tanmay-db added this pull request to the merge queue Jul 9, 2024
Merged via the queue into main with commit ccad28f Jul 9, 2024
5 checks passed
@tanmay-db tanmay-db deleted the rh/api-error-dep branch July 9, 2024 11:05
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
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.

2 participants