Skip to content

Grouping verify#5784

Draft
tanmay-db wants to merge 3 commits into
mainfrom
grouping-verify
Draft

Grouping verify#5784
tanmay-db wants to merge 3 commits into
mainfrom
grouping-verify

Conversation

@tanmay-db

Copy link
Copy Markdown
Contributor

Changes

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • using Go SDK
  • using TF Plugin Framework
  • has entry in NEXT_CHANGELOG.md file

tanmay-db added 3 commits June 3, 2026 12:41
Move SDKv2 resource and data source registration out of sdkv2.go into a new resources.go, split into Workspace*, Account*, and Dual* maps. sdkv2.go now calls Resources() / DataSources(), which flatten the three maps via merge. This is an organizational change with no runtime effect today.

Add TestApiField_RegistrationConsistency asserting that every Dual* entry carries the "api" schema attribute (the single signal that a resource is dual, set by common.AddApiField) and every Workspace*/Account* entry does not.

Co-authored-by: Isaac
…tion tests

TestProviderConfig_AccountRegistrationConsistency asserts that account resources and data sources do not carry the provider_config block (they have no workspace context), pinning the two deprecated account-only data sources that retain it for backward compatibility.

TestNoDuplicateKeys asserts that no Terraform name is registered in more than one of the Workspace*/Account*/Dual* maps within a namespace; the split into three maps removed the compile-time duplicate-key guarantee a single map literal provided.

Co-authored-by: Isaac
Verification-branch-only golden snapshot: goldenDataSources/goldenResources are copied verbatim from main's pre-split sdkv2.go. TestRegistration_NoDriftFromPreSplit asserts Resources()/DataSources() register the exact same keys and that each key maps to a resource with the same schema fingerprint (catches accidental add, remove, or remap). Not intended to merge.

Co-authored-by: Isaac
@tanmay-db tanmay-db temporarily deployed to test-trigger-is June 4, 2026 15:07 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes.
If this is not necessary for your PR, please include the following in your PR description:
NO_CHANGELOG=true
and rerun the job.

@tanmay-db tanmay-db temporarily deployed to test-trigger-is June 4, 2026 15:09 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 4, 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: 5784
  • Commit SHA: 19d7ac3695b772ba497a668b97e3e37e1f7e0ff2

Checks will be approved automatically on success.

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.

1 participant