Skip to content

feat(client): read basedOnDraftVersion from the building block status - #52

Merged
grubmeshi merged 1 commit into
mainfrom
feature/building-block-parent-change-on-drafts
Oct 29, 2026
Merged

grubmeshi merged 1 commit into
mainfrom
feature/building-block-parent-change-on-drafts

Conversation

@grubmeshi

@grubmeshi grubmeshi commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

meshStack reports in status.basedOnDraftVersion whether the building block is on a draft version of its definition, which lets a PUT change its parent building blocks on that version. The client reads it as MeshBuildingBlockV2Status.BasedOnDraftVersion, which is nil from a meshStack that does not send it. It is excluded from the Terraform model (tfsdk:"-").

🤖 Generated with Claude Code

@meshcloud-gh-actions

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

Copy link
Copy Markdown

Coverage of the acceptance run against the meshStack backend, on 15a41b6eef7e4e92c4a05f53c5f97e3afd352685.

Scope Coverage
Unit tests 77.9%
Acceptance tests 54.5%
Combined 80.4%
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:79: MeshBuildingBlockDefinitionImplementation.InferType 0.0%
client/building_block_definition_version_implementation.go:93: MeshBuildingBlockDefinitionImplementation.MarshalJSON 0.0%
client/building_block_definition_version_implementation.go:106: *MeshBuildingBlockDefinitionImplementation.UnmarshalJSON 0.0%
client/building_block_runner.go:87: meshBuildingBlockRunnerClient.Create 0.0%
... and 129 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.

@grubmeshi
grubmeshi force-pushed the feature/building-block-parent-change-on-drafts branch from 85b6ee5 to 5fccf47 Compare October 26, 2026 13:11
@grubmeshi grubmeshi changed the title feat(client): read parentsChangeable from the building block status feat(client): read basedOnDraftVersion from the building block status Oct 26, 2026
meshStack reports whether the block is on a draft version of its
definition, which lets a PUT change its parent building blocks on that
version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grubmeshi
grubmeshi force-pushed the feature/building-block-parent-change-on-drafts branch from 5fccf47 to 15a41b6 Compare October 28, 2026 13:46
@sonarqubecloud

Copy link
Copy Markdown

@grubmeshi
grubmeshi marked this pull request as ready for review October 29, 2026 04:21
@grubmeshi
grubmeshi merged commit 15a41b6 into main Oct 29, 2026
13 checks passed
@grubmeshi
grubmeshi deleted the feature/building-block-parent-change-on-drafts branch October 29, 2026 04:22
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