Skip to content

feat(client): read updateableByConsumer of a building block input - #99

Open
tfelix wants to merge 1 commit into
mainfrom
feature/replace-on-locked-input-change
Open

tfelix wants to merge 1 commit into
mainfrom
feature/replace-on-locked-input-change

Conversation

@tfelix

@tfelix tfelix commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 Written by AI agent

meshStack reports for each input of a building block whether a consumer may change it after the building block is created (updateableByConsumer). The client dropped this field. It now reads it.

The Terraform provider needs the field to plan a replacement when such an input changes, see meshcloud/terraform-provider-meshstack#407. Today it plans an in-place update, which meshStack rejects with a 403 for a workspace API key.

The field is a pointer and is never sent: meshStack treats it as read-only.

🤖 Generated with Claude Code

meshStack reports for each input of a building block whether a consumer
may change it after creation. The Terraform provider needs this to plan
a replacement instead of an update that meshStack would reject.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@meshcloud-gh-actions

Copy link
Copy Markdown

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

Scope Coverage
Unit tests 78.4%
Acceptance tests 54.7%
Combined 80.9%
Uncovered functions
client/api_key.go:52: meshApiKeyClient.Create 0.0%
client/api_key.go:56: meshApiKeyClient.Read 0.0%
client/api_key.go:60: meshApiKeyClient.Update 0.0%
client/api_key.go:64: 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:263: AllApiKeyPermissions 0.0%
client/api_key_permissions.go:267: WorkspacePermissionCodes 0.0%
client/binding_status.go:18: *MeshGroupBindingStatus.WaitsForApproval 0.0%
client/binding_status.go:22: *MeshUserBindingStatus.WaitsForApproval 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:102: MeshBuildingBlockType.TagInputTargets 0.0%
client/building_block_definition_version.go:246: meshBuildingBlockDefinitionVersionClient.Create 0.0%
client/building_block_definition_version.go:255: meshBuildingBlockDefinitionVersionClient.Update 0.0%
client/building_block_definition_version_implementation.go:81: MeshBuildingBlockDefinitionImplementation.InferType 0.0%
client/building_block_definition_version_implementation.go:95: MeshBuildingBlockDefinitionImplementation.MarshalJSONTo 0.0%
... and 128 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.

@sonarqubecloud

Copy link
Copy Markdown

@tfelix
tfelix requested a review from grubmeshi November 19, 2026 10:45
@tfelix
tfelix marked this pull request as ready for review November 19, 2026 10:45
Comment thread client/building_block_v2.go Resolved
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