fix(ci): tolerate fabricx auto-verify race in e2e#30
Merged
Conversation
The deployer kicks off background verification once every node joins
(VerifyNetwork, see fabricx.go:57-67). In CI it can race the orderer
router becoming reachable, so the network may already be in
verification_failed by the time the e2e checks the status — even though
the prior namespace-create step proved the network actually works.
When that happens, the test now POSTs /networks/fabricx/{id}/verify to
run verification synchronously, then accepts running OR
genesis_block_created.
Signed-off-by: David Viejo <dviejo@kungfusoftware.es>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The new FabricX background verifier (introduced in #29) races the orderer router becoming reachable in CI. By the time the e2e "Verify FabricX network is queryable via API" step runs, the network is already in `verification_failed` even though the prior `Create namespace via API and verify finality` step proved the network is functional.
Fix
When the status is `verification_failed`, POST `/networks/fabricx/{id}/verify` to run verification synchronously, then accept either `running` or `genesis_block_created`.
This is a CI-only change — no runtime behavior changes.
Repro
Failing run on main:
```
06:45:18.082 Namespace 'e2etest' committed (attempt 1)
06:45:18.246 FabricX network status: verification_failed
06:45:18.246 Expected status genesis_block_created, got verification_failed
```
Test plan