Skip to content

feat(client): move building blocks and their definitions to the GA APIs - #36

Open
grubmeshi wants to merge 3 commits into
mainfrom
feature/make-bb-bbd-ga
Open

grubmeshi wants to merge 3 commits into
mainfrom
feature/make-bb-bbd-ga

Conversation

@grubmeshi

@grubmeshi grubmeshi commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

API client side of meshcloud/meshfed-release#10612. meshcloud/terraform-provider-meshstack#274 uses this branch.

Merge only after #10612 is in a meshStack release, and set MinMeshStackVersion to that release first.

🤖 Generated with Claude Code

grubmeshi and others added 2 commits October 14, 2026 10:41
The backend of a satellite run or a local stack reports its newest tag.
A branch that raises MinMeshStackVersion for the coming release would
otherwise fail every test at login.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The meshBuildingBlock client uses the v2 media type and the
meshBuildingBlockDefinition and its version client the v1 one, none of them
-preview any more. The GA meshBuildingBlock carries the parents in
spec.parentBuildingBlockRefs alone, so the client drops the deprecated
parentBuildingBlocks field and its MarshalJSON and UnmarshalJSON. The v1
building block client (client.BuildingBlock, MeshBuildingBlock and its DTOs)
goes as well: only the Terraform provider's removed meshstack_buildingblock
resource used it.

MinMeshStackVersion is 2026.42.0, the earliest release that can serve the GA
APIs. Set it to the release that ships them once it is known.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grubmeshi
grubmeshi force-pushed the feature/make-bb-bbd-ga branch from 150da74 to 21849ca Compare October 14, 2026 08:41
@meshcloud-gh-actions

meshcloud-gh-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Coverage of the acceptance run against the meshStack backend, on c99b890b4ada9b2501316fdc563449024ee9a616.

Scope Coverage
Unit tests 79.0%
Acceptance tests 54.6%
Combined 80.9%
Uncovered functions
client/api_key.go:55: meshApiKeyClient.Create 0.0%
client/api_key.go:59: meshApiKeyClient.Read 0.0%
client/api_key.go:63: meshApiKeyClient.Update 0.0%
client/api_key.go:71: meshApiKeyClient.Delete 0.0%
client/api_key_permissions.go:20: ApiKeyPermissions.AllCodes 0.0%
client/api_key_permissions.go:33: ApiKeyPermissions.WorkspaceCodes 0.0%
client/api_key_permissions.go:295: AllApiKeyPermissions 0.0%
client/api_key_permissions.go:299: WorkspacePermissionCodes 0.0%
client/building_block_definition.go:71: MeshBuildingBlockDefinitionApprovalPolicies.NothingRequiresApproval 0.0%
client/building_block_definition.go:82: DisabledSchedule 0.0%
client/building_block_definition.go:89: MeshBuildingBlockDefinitionSchedule.IsDisabled 0.0%
client/building_block_definition.go:93: MeshBuildingBlockDefinitionSpec.HasNeutralPolicies 0.0%
client/building_block_definition.go:97: MeshBuildingBlockDefinitionSpec.WithNeutralPolicies 0.0%
client/building_block_definition.go:166: meshBuildingBlockDefinitionClient.List 0.0%
client/building_block_definition.go:173: meshBuildingBlockDefinitionClient.Read 0.0%
client/building_block_definition.go:177: meshBuildingBlockDefinitionClient.Create 0.0%
client/building_block_definition.go:181: meshBuildingBlockDefinitionClient.Update 0.0%
client/building_block_definition.go:185: meshBuildingBlockDefinitionClient.Delete 0.0%
client/building_block_definition_version.go:100: MeshBuildingBlockType.TagInputTargets 0.0%
client/building_block_definition_version.go:245: meshBuildingBlockDefinitionVersionClient.Create 0.0%
client/building_block_definition_version.go:254: meshBuildingBlockDefinitionVersionClient.Update 0.0%
client/building_block_definition_version_implementation.go:80: MeshBuildingBlockDefinitionImplementation.InferType 0.0%
client/building_block_definition_version_implementation.go:94: MeshBuildingBlockDefinitionImplementation.MarshalJSON 0.0%
client/building_block_definition_version_implementation.go:107: *MeshBuildingBlockDefinitionImplementation.UnmarshalJSON 0.0%
client/building_block_runner.go:82: meshBuildingBlockRunnerClient.Create 0.0%
... and 120 more

covdata func names a method without its receiver, so an entry can belong to an implementation nothing selects rather than to a function the tests never reached. Open the file and line before reading one as a coverage gap.

The client and the variant package each kept a copy of the options internal/json
marshals every request with. Marshaling through internal/json.Marshal keeps a single
option set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grubmeshi
grubmeshi force-pushed the feature/make-bb-bbd-ga branch from 5c2ccf0 to c99b890 Compare October 14, 2026 10:51
@grubmeshi
grubmeshi marked this pull request as ready for review October 14, 2026 10:53
@grubmeshi
grubmeshi requested a review from j0g3sc October 14, 2026 10:54
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