Skip to content

Update SDK API to 9718484d914270778e25e06040a5b3a17e19a7f7#5773

Merged
Divyansh-db merged 3 commits into
mainfrom
automation/sdk-update
Jun 2, 2026
Merged

Update SDK API to 9718484d914270778e25e06040a5b3a17e19a7f7#5773
Divyansh-db merged 3 commits into
mainfrom
automation/sdk-update

Conversation

@databricks-ci-ghec-2

@databricks-ci-ghec-2 databricks-ci-ghec-2 Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

This PR updates the SDK to the latest API changes.

2 new optional fields added to pipeline deployment in databricks/databricks-sdk-go#1705 which lead to assertions on test failing. Fixed the tests.

NO_CHANGELOG=true

@databricks-ci-ghec-2 databricks-ci-ghec-2 Bot requested review from a team as code owners June 1, 2026 12:16
@databricks-ci-ghec-2 databricks-ci-ghec-2 Bot requested review from simonfaltum and removed request for a team June 1, 2026 12:16
SDK v0.140.0 adds DeploymentId and VersionId to PipelineDeployment, so
the read-back deployment block now contains deployment_id and version_id
keys. Update the expected map to match.

Co-authored-by: Isaac
@Divyansh-db Divyansh-db temporarily deployed to test-trigger-is June 1, 2026 13:12 — with GitHub Actions Inactive
@Divyansh-db Divyansh-db temporarily deployed to test-trigger-is June 1, 2026 13:14 — with GitHub Actions Inactive
@Divyansh-db Divyansh-db requested review from tanmay-db and removed request for a team and simonfaltum June 1, 2026 13:20

type PublicTokenInfo struct {
// Output only. The autoscope state of this token.
AutoscopeState types.Object `tfsdk:"autoscope_state"`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This generated field has the wrong TF value type. The SDK field is iam.AutoscopeState, a string enum, and Type() below advertises autoscope_state as types.StringType, but the struct field here is types.Object (and the legacy model has it as types.List). converters.GoSdkToTfSdkStruct therefore converts a non-empty AutoscopeState to types.StringValue(...) and then panics when setting this field: reflect.Set: value of type basetypes.StringValue is not assignable to type basetypes.ObjectValue.

Please generate this as types.String in both PublicTokenInfo and TokenInfo (and the _SdkV2 legacy variants), or suppress the field until the generator maps the enum correctly. I verified this with a local conversion probe against SDK v0.140.0.

@Divyansh-db Divyansh-db Jun 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks Simon — diagnosis is right. The root cause is upstream in the codegen: GetTfSdkFieldType has a stray clause that maps cross-package enums to types.Object/types.List, while BaseAttrType correctly maps every enum to types.StringType. The two disagree exactly when a TFSDK field is an enum imported from another proto package.

Scope here is just this one field — AutoscopeState (×4: PublicTokenInfo, TokenInfo, and their _SdkV2 variants in settings_tf). A per-struct accurate scan across all 70 internal/service/*_tf/*.go files reports zero other Object/List-vs-StringType mismatches on origin/main or on this PR's HEAD.

Nothing exercises the broken types today — grep -rn 'PublicTokenInfo\|TokenInfo' internal/providers/pluginfw/ returns zero. The panic is latent.

Codegen fix is in flight upstream; once it lands and a regen sweep follows, the four lines flip to types.String and the disagreement is gone. Proposing we merge this PR as-is (CI green) and let the regen sweep clean up the four lines in a follow-up. Let me know if you'd rather block instead.

@tanmay-db tanmay-db requested review from tanmay-db and removed request for tanmay-db June 1, 2026 13:39
@tanmay-db tanmay-db temporarily deployed to test-trigger-is June 1, 2026 15:17 — with GitHub Actions Inactive
@tanmay-db tanmay-db temporarily deployed to test-trigger-is June 1, 2026 15:17 — with GitHub Actions Inactive
@databricks-ci-ghec-2 databricks-ci-ghec-2 Bot deleted the automation/sdk-update branch June 2, 2026 04:36
@Divyansh-db Divyansh-db restored the automation/sdk-update branch June 2, 2026 08:37
@Divyansh-db Divyansh-db reopened this Jun 2, 2026
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

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: 5773
  • Commit SHA: 09579ebdfd566701b55bed0c63c6e41270b7de96

Checks will be approved automatically on success.

@Divyansh-db Divyansh-db enabled auto-merge June 2, 2026 15:37
@Divyansh-db Divyansh-db added this pull request to the merge queue Jun 2, 2026
Merged via the queue into main with commit cd4b112 Jun 2, 2026
15 checks passed
@Divyansh-db Divyansh-db deleted the automation/sdk-update branch June 2, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants