Skip to content

bb-eager-pending: wait for a building block by its action - #72

Open
grubmeshi wants to merge 2 commits into
mainfrom
feature/bb-eager-pending
Open

grubmeshi wants to merge 2 commits into
mainfrom
feature/bb-eager-pending

Conversation

@grubmeshi

@grubmeshi grubmeshi commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

bb-eager-pending

After a write that asks for a run, meshStack shows the building block action PENDING until the block coordinator has started the run or answered that none starts. A request that gets no answer within 90 s shows REVIEW_ERRORS. Clients can then wait on status.action alone, and the heuristics that guessed which run belongs to a write go away.

This PR makes bb wait <uuid> and trigger-run --wait poll while the action is PENDING or IN_PROGRESS, and removes RunChangedSince, RunEndedSince and the run-start window. bb wait no longer takes --before; it waits for the current state of the block.

Release only after the meshStack release that contains the meshfed-release PR.

Cross-repo PRs

🤖 Generated with Claude Code

@meshcloud-gh-actions

meshcloud-gh-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Coverage of the acceptance run against the meshStack backend, on 00c3d578d7f8e210142a8a601e26a8f93690946b.

Scope Coverage
Unit tests 78.3%
Acceptance tests 54.6%
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.

@grubmeshi
grubmeshi force-pushed the feature/bb-eager-pending branch from 81ea0da to 75c50e3 Compare November 8, 2026 18:45
grubmeshi and others added 2 commits November 20, 2026 03:19
…GRESS

meshStack now shows PENDING from a write that asks for a run until it has
started the run or decided that none starts. So "bb wait <uuid>" waits
for the current state, and "bb trigger-run" waits only while the block is
PENDING. "bb wait" needs no answer of the write any more, so --before is
gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A client waits while status.action is PENDING or IN_PROGRESS, so it no
longer compares the block with its state before the write.
RunChangedSince and RunEndedSince are gone. DeletionSuccessful takes no
status from before the deletion any more and treats a PENDING delete run
as running. The TriggerRun doc says that the answer shows PENDING.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grubmeshi
grubmeshi force-pushed the feature/bb-eager-pending branch from 75c50e3 to 00c3d57 Compare November 20, 2026 02:20
@sonarqubecloud

Copy link
Copy Markdown

@grubmeshi
grubmeshi marked this pull request as ready for review November 20, 2026 07:07
@grubmeshi
grubmeshi requested a review from tfelix November 20, 2026 07:07

@tfelix tfelix left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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