Wait for backup ledger chunks before reading - #8258
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 24512232-71af-4193-b26d-1b8acbb02d5a
There was a problem hiding this comment.
🟡 Changes recommended
The new wait uses the recovery timeout, but the subsequent get_ledger_from_api() call still uses its 5s default, so the flake may persist under slow/perturbed runs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Fixes a race in the governance history end-to-end test by synchronising on ledger chunk availability per node before attempting local ledger reads, reducing flakiness in slower CI configurations.
Changes:
- Wait for each node (primary + backups) to expose the forced ledger chunk before reading its local ledger.
- Use the existing ledger recovery timeout for the new per-node wait.
Custom instructions used:
- None (no
.github/copilot-instructions.md/.github/instructions/*files were loaded during this review)
File summaries
| File | Description |
|---|---|
tests/governance_history.py |
Adds per-node wait_for_ledger_chunk() to synchronise backups before reading local ledger chunks. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The added wait_for_ledger_chunk call can follow redirects and may not actually guarantee the chunk is available locally on backups, undermining the intended synchronization.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Use the existing ledger recovery timeout for local-only ledger downloads so backups can receive and flush forced chunks before they are read.
Closes #8248