Skip to content

feat!: move tenant resources to the meshTenant v4 GA media type (CU-86c0j0r7q)#227

Open
grubmeshi wants to merge 2 commits into
feature/adopt-tenant-v4from
feature/make-tenant-v4-ga
Open

feat!: move tenant resources to the meshTenant v4 GA media type (CU-86c0j0r7q)#227
grubmeshi wants to merge 2 commits into
feature/adopt-tenant-v4from
feature/make-tenant-v4-ga

Conversation

@grubmeshi

@grubmeshi grubmeshi commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

What

Flips the tenant resources/data sources from the v4-preview media type to the v4 GA media type (application/vnd.meshcloud.api.meshtenant.v4.hal+json) and removes the preview disclaimers. Behaviourally identical to v0.24.0 — same body shape.

  • CHANGELOG v0.24.1 (patch; breaking-but-behaviourally-identical media-type flip).

Stacks on B0 (#226). Requires a meshStack release where the meshTenant v4 API is GA (A2, #10309).

Cross-repo PRs

@grubmeshi

Copy link
Copy Markdown
Collaborator Author

Related PRs (CU-86c0j0r7q, make-tenant-v4-ga):

Merge order: meshfed PR-1 → PR-2 (deploy) → provider PR-1 (release, works via the preview alias) → provider PR-2 (GA flip).

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

📊 Test Coverage

Scope Coverage
Unit tests (mock client) 74.5%
Combined (unit + acceptance) 79.5% — ❌ acceptance failed

Acceptance tests failed — this blocks merge. If the change needs a companion backend change, merge its meshfed-release PR first (rebuilds :latest), then re-run; otherwise it is a regression to fix. See the acceptance comment for details.

Uncovered functions (combined run)
github.com/meshcloud/terraform-provider-meshstack/client/api_key_permissions.go:225:							AllApiKeyPermissions					0.0%
github.com/meshcloud/terraform-provider-meshstack/client/buildingblock.go:89:								Read							0.0%
github.com/meshcloud/terraform-provider-meshstack/client/buildingblock.go:93:								Create							0.0%
github.com/meshcloud/terraform-provider-meshstack/client/buildingblock.go:97:								Delete							0.0%
github.com/meshcloud/terraform-provider-meshstack/client/client.go:48:									NewApiTokenAuthorization				0.0%
github.com/meshcloud/terraform-provider-meshstack/client/internal/logging.go:27:							Debug							0.0%
github.com/meshcloud/terraform-provider-meshstack/client/internal/logging.go:31:							Info							0.0%
github.com/meshcloud/terraform-provider-meshstack/client/internal/logging.go:35:							Warn							0.0%
github.com/meshcloud/terraform-provider-meshstack/client/internal/retry.go:228:								Close							0.0%
github.com/meshcloud/terraform-provider-meshstack/client/internal/retry.go:249:								Write							0.0%

Combined with go tool covdata merge over the unit and acceptance coverage data. The acceptance suite runs ./internal/provider against the live backend; coverage is attributed across all packages (-coverpkg=./...).

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Acceptance tests failed — this blocks merge. The job runs against the last merged meshfed-release backend (:latest). If this change needs a companion backend change, get its meshfed-release PR green and merged first (that rebuilds :latest), then re-run this job; otherwise it is a regression to fix. Measured coverage for this run is in the coverage comment above.

🔗 Failing acceptance job · companion meshfed-release PR — same branch (private; 404 without access)

@grubmeshi
grubmeshi force-pushed the feature/make-tenant-v4-ga branch from 73574ac to b7485fd Compare July 7, 2026 20:47
@grubmeshi
grubmeshi force-pushed the feature/adopt-tenant-v4 branch 2 times, most recently from eaec87a to 2168a82 Compare July 7, 2026 20:53
@grubmeshi
grubmeshi force-pushed the feature/make-tenant-v4-ga branch from b7485fd to c3513c3 Compare July 7, 2026 20:53
@grubmeshi
grubmeshi force-pushed the feature/adopt-tenant-v4 branch from 2168a82 to 9da0ded Compare July 9, 2026 20:06
@grubmeshi
grubmeshi force-pushed the feature/make-tenant-v4-ga branch from c3513c3 to 28c672a Compare July 9, 2026 20:06
@grubmeshi
grubmeshi requested a review from Copilot July 10, 2026 07:00

Copilot AI left a comment

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.

Pull request overview

This PR promotes the tenant resources/data sources from the v4-preview media type to the v4 GA media type and removes the preview disclaimers from both schema descriptions and generated docs, aligning the provider with the GA meshTenant v4 endpoint.

Changes:

  • Switch the tenant v4 meshObject client from v4-preview to v4.
  • Remove previewDisclaimer() from tenant-related resource/data source schema descriptions.
  • Regenerate/update docs and add a v0.24.1 changelog entry for the media-type flip.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/provider/tenants_data_source.go Removes preview disclaimer from plural tenants data source schema description.
internal/provider/tenant_v4_resource.go Removes preview disclaimer from deprecated meshstack_tenant_v4 resource schema description.
internal/provider/tenant_v4_data_source.go Removes preview disclaimer from deprecated meshstack_tenant_v4 data source schema description.
internal/provider/tenant_resource.go Removes preview disclaimer from meshstack_tenant resource schema description.
internal/provider/tenant_data_source.go Removes preview disclaimer from deprecated singular tenant data source schema description.
docs/resources/tenant.md Removes preview disclaimer blocks from generated resource documentation.
docs/resources/tenant_v4.md Removes preview disclaimer blocks from generated deprecated resource documentation.
docs/data-sources/tenants.md Removes preview disclaimer blocks from generated plural data source documentation.
docs/data-sources/tenant.md Removes preview disclaimer blocks from generated deprecated singular data source documentation.
docs/data-sources/tenant_v4.md Removes preview disclaimer blocks from generated deprecated v4 data source documentation.
client/tenant_v4.go Switches tenant v4 client initialization to apiVersion = "v4" (GA).
CHANGELOG.md Adds v0.24.1 entry documenting the breaking media-type flip and disclaimer removal.

Comment thread CHANGELOG.md Outdated
@grubmeshi
grubmeshi force-pushed the feature/adopt-tenant-v4 branch from 9da0ded to 456bb92 Compare July 10, 2026 08:36
@grubmeshi
grubmeshi force-pushed the feature/make-tenant-v4-ga branch from 28c672a to f0cb5ec Compare July 10, 2026 08:36
@grubmeshi
grubmeshi force-pushed the feature/adopt-tenant-v4 branch from 456bb92 to 33540dc Compare July 10, 2026 09:57
@grubmeshi
grubmeshi force-pushed the feature/make-tenant-v4-ga branch from f0cb5ec to be377ca Compare July 10, 2026 09:57
@grubmeshi
grubmeshi force-pushed the feature/adopt-tenant-v4 branch from 33540dc to fc80215 Compare July 13, 2026 09:57
@grubmeshi
grubmeshi force-pushed the feature/make-tenant-v4-ga branch from be377ca to c5dbfd3 Compare July 13, 2026 09:57
grubmeshi and others added 2 commits July 14, 2026 15:05
Reimplement meshstack_tenant on the shared v4 body (platform_ref, landing_zone_ref,
platform_tenant_id, status, ref, wait_for_completion):
- v3->v4 state upgrade (SchemaVersion 1): the upgrader resolves the tenant via the list
  endpoint (Configure runs before UpgradeResourceState) and backfills uuid + refs.
- moved support from meshstack_tenant_v4 (shared body -> non-destructive).
- import accepts a tenant UUID or the legacy workspace.project.location.platform composite.
- singular data source reimplemented over TenantV4.List (composite key).
- deprecate the meshstack_tenant_v4 resource (-> meshstack_tenant + moved) and the singular
  meshstack_tenant / meshstack_tenant_v4 data sources (-> plural meshstack_tenants).
- rename the plural tenants data source's internal identifiers off the _v4 suffix (HCL name
  meshstack_tenants unchanged).

Shared the v4 body schema + state mapping between meshstack_tenant and meshstack_tenant_v4.
Adds a WithRawBlock test helper for moved-block configs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Flip the tenant v4 client from the v4-preview media type to GA (v4) and drop the now-obsolete
preview disclaimers from the tenant resources and data sources. Behaviourally identical to the
previous release (same v4 body); requires a meshStack where the meshTenant v4 API is GA.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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