Skip to content

feat(client): let a building block update skip its run - #64

Closed
grubmeshi wants to merge 1 commit into
mainfrom
feature/bb-update-await-run
Closed

grubmeshi wants to merge 1 commit into
mainfrom
feature/bb-update-await-run

Conversation

@grubmeshi

@grubmeshi grubmeshi commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

bb-update-await-run

BD-2867: a building block update through the meshObject API can skip its run. meshStack gets an optional skipRun query parameter on PUT /api/meshobjects/meshbuildingblocks/{uuid}.

MeshBuildingBlockV2Client.Update takes MeshBuildingBlockV2UpdateOptions and sends it as URL query with http.WithUrlQuery. SkipRun: true sends skipRun=true. The zero value sends no parameter, so it works against a meshStack without the parameter. MeshObjectClient.Put accepts request options for this.

This changes the Update signature. The Terraform provider updates its callers and its mock in its PR.

Tests

TestMeshBuildingBlockV2Client_UpdateSendsSkipRunOnlyWhenSet checks the query string for the zero value and for SkipRun: true. task lint and task test pass.

Cross-repo PRs

🤖 Generated with Claude Code

MeshBuildingBlockV2Client.Update takes MeshBuildingBlockV2UpdateOptions,
sent as query parameters. SkipRun asks meshStack to save the update without
starting a run; the zero value sends no parameter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@meshcloud-gh-actions

Copy link
Copy Markdown

Coverage of the acceptance run against the meshStack backend, on 2975a1f3ae84ac945b1a308187c7c8bb6f0ccd35.

Scope Coverage
Unit tests 78.2%
Acceptance tests 56.0%
Combined 80.8%
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:87: meshBuildingBlockRunnerClient.Create 0.0%
... and 127 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

Copy link
Copy Markdown
Collaborator Author

Closed without merge: BD-2867 is answered with Building Block run approval policies (preflight run, approval only when the plan has changes). An update without a run would leave the block stale until an unrelated later run applies the change.

@grubmeshi grubmeshi closed this Nov 2, 2026
@grubmeshi
grubmeshi deleted the feature/bb-update-await-run branch November 2, 2026 08:33
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