Skip to content

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

Merged
grubmeshi merged 2 commits into
mainfrom
feature/bb-eager-pending
Nov 26, 2026
Merged

grubmeshi merged 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 23358cb9177e14df4c7c344f12caf3bc9abf4451.

Scope Coverage
Unit tests 79.0%
Acceptance tests 56.6%
Combined 83.4%
Uncovered functions
client/api_key.go:18: MeshApiKey.meshObjectId 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:68: MeshBuildingBlockDefinitionApprovalPolicies.NothingRequiresApproval 0.0%
client/building_block_definition.go:79: DisabledSchedule 0.0%
client/building_block_definition.go:86: MeshBuildingBlockDefinitionSchedule.IsDisabled 0.0%
client/building_block_definition.go:90: MeshBuildingBlockDefinitionSpec.HasNeutralPolicies 0.0%
client/building_block_definition.go:94: MeshBuildingBlockDefinitionSpec.WithNeutralPolicies 0.0%
client/building_block_definition.go:148: MeshBuildingBlockDefinition.meshObjectId 0.0%
client/building_block_definition_version.go:99: MeshBuildingBlockType.TagInputTargets 0.0%
client/building_block_definition_version.go:220: MeshBuildingBlockDefinitionVersion.meshObjectId 0.0%
client/building_block_definition_version.go:223: MeshBuildingBlockDefinitionVersion.meshObjectNoSortQuery 0.0%
client/building_block_run.go:138: meshBuildingBlockRunClient.Claim 0.0%
client/building_block_run.go:158: MeshBuildingBlockRun.Abort 0.0%
client/building_block_run.go:181: MeshBuildingBlockRun.meshObjectId 0.0%
client/building_block_run_source.go:64: meshBuildingBlockRunClient.RegisterSource 0.0%
client/building_block_run_source.go:73: meshBuildingBlockRunClient.UpdateSourceSteps 0.0%
client/building_block_run_source.go:78: meshBuildingBlockRunClient.DownloadArtifact 0.0%
client/building_block_run_source.go:87: meshBuildingBlockRunClient.UploadArtifact 0.0%
client/building_block_run_source.go:98: *cappedWriter.Write 0.0%
client/building_block_runner.go:67: MeshBuildingBlockRunner.meshObjectId 0.0%
... and 71 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
grubmeshi force-pushed the feature/bb-eager-pending branch from 75c50e3 to 00c3d57 Compare November 20, 2026 02:20
@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

@grubmeshi
grubmeshi force-pushed the feature/bb-eager-pending branch 3 times, most recently from f96d0c9 to d7ead4b Compare November 25, 2026 17:04
grubmeshi and others added 2 commits November 26, 2026 14:20
…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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grubmeshi
grubmeshi force-pushed the feature/bb-eager-pending branch from d7ead4b to 23358cb Compare November 26, 2026 13:22
@sonarqubecloud

Copy link
Copy Markdown

@grubmeshi
grubmeshi merged commit 23358cb into main Nov 26, 2026
14 checks passed
@grubmeshi
grubmeshi deleted the feature/bb-eager-pending branch November 26, 2026 14:05
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