Skip to content

Conversation

tanmay-db
Copy link
Contributor

@tanmay-db tanmay-db commented Aug 22, 2025

Changes

Plugin framework implementation of share resource is not compatible with SDKv2. Compatibility difference arises because of how these libraries apply the changes internally:

Plugin Framework checks if the state is null for creation: https://github.com/hashicorp/terraform-plugin-framework/blob/main/internal/fwserver/server_applyresourcechange.go#L47

// If PriorState is missing/null, its a Create request.
if req.PriorState == nil || req.PriorState.Raw.IsNull() {...}

Whereas SDKv2 checks the ID: https://github.com/hashicorp/terraform-plugin-sdk/blob/main/helper/schema/resource.go#L976

if data.Id() == "" {
// We're creating, it is a new resource.
...
}

Because of the incompatibility, SDKv2 re-creates the share resource after it has been created by plugin framework. The PR adds the ID field as part of schema. This change makes the plugin framework implementation compatible with SDKv2

Tests

@tanmay-db tanmay-db changed the title [Internal] Make plugin framework implementation of share resource as … [Internal] Add support for share resource in plugin framework implementation to be SDKv2 compatible Aug 22, 2025
@tanmay-db tanmay-db marked this pull request as ready for review August 22, 2025 10:56
@tanmay-db tanmay-db requested review from a team as code owners August 22, 2025 10:56
@tanmay-db tanmay-db requested review from hectorcast-db and removed request for a team and hectorcast-db August 22, 2025 10:56
@alexott alexott requested review from a team and mgyucht and removed request for a team August 22, 2025 11:16
@tanmay-db
Copy link
Contributor Author

Failing tests are unrelated, they are failing on main

@tanmay-db tanmay-db changed the title [Internal] Add support for share resource in plugin framework implementation to be SDKv2 compatible [Internal] Make databricks_share_pluginframework SDKv2 compatible Aug 22, 2025
@rauchy rauchy temporarily deployed to test-trigger-is August 28, 2025 08:32 — with GitHub Actions Inactive
@rauchy rauchy temporarily deployed to test-trigger-is August 28, 2025 08:33 — with GitHub Actions Inactive
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 4965
  • Commit SHA: 070ef9981adbef162688a4dc1f6309913fd3cba3

Checks will be approved automatically on success.

@tanmay-db tanmay-db added this pull request to the merge queue Sep 17, 2025
Merged via the queue into main with commit b6bfa78 Sep 17, 2025
12 checks passed
@tanmay-db tanmay-db deleted the share-resource-sdkv2-compatible branch September 17, 2025 09:51
deco-sdk-tagging bot added a commit that referenced this pull request Sep 17, 2025
## Release v1.90.0

### New Features and Improvements

* Added `no_wait` option for `databricks_sql_endpoint` to skip waiting to start on warehouse creation ([#5014](#5014))

### Bug Fixes

* Remove incorrect customization for `databricks_catalog` ([#5021](#5021))
* Fix filling of `active` attribute in `databricks_user` data source ([#5026](#5026))
* Add support for share resource in plugin framework implementation to be SDKv2 compatible ([#4965](#4965))

### Internal Changes
* Use `Jobs.Get` instead of `JobsGetByJobId` ([#5029](#5029))
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.

5 participants