mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 16:29:39 +00:00
ci: Share qa-assets across GitHub Actions jobs #36872
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36872
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/shared-test-assets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
CI jobs download the same qa-assets inputs separately. As reported in #36814, these repeated requests can fail with HTTP 504 before the tests start.
Add one preparation job that checks out qa-assets once per workflow run and shares the unit-test data and fuzz corpus through Actions artifacts. Linux, macOS and Windows consumers verify the selected revision and file hashes before using them.
Containers mount the shared inputs read-only. Fuzz jobs use separate writable copies. Standalone CI scripts keep direct acquisition through the common download helper.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Earlier concerns remain unresolved; see the Run archive linked from the Review report.
🟠 Minor · Shared asset preparation now gates matrix entries that never use it
A preparation failure now skips nine build-only or static-analysis matrix entries that never consume qa-assets, and successful runs make them restore an unused artifact.
Location:
.github/workflows/ci.yml:415(head).🟠 Minor · Three-day asset retention blocks older failed-job reruns
By inspection, failed-job reruns after the three-day artifact expiry cannot restore qa-assets when preparation previously succeeded; a full workflow rerun is needed.
Location:
.github/workflows/ci.yml:627(head).🟠 Minor · Standalone asset acquisition no longer refreshes or repairs existing files
Persistent standalone workspaces now reuse old script vectors or fail on malformed existing files; no current CI caller supplying a pre-existing file was found.
Location:
test/download_utils.py:142(head).🔵 Suggestion · Fuzz restoration retains the archive and duplicates source verification
Each fresh fuzz consumer retains the tar alongside two corpus trees and hashes the corpus three times, including two source-verification passes.
Location:
test/download_utils.py:163(head).🔵 Suggestion · Manifest rejection paths lack negative tests
Normal CI exercises successful asset verification, but does not distinguish it from a verifier that accepts modified files or the wrong revision.
Location:
test/download_utils.py:74(head).🔵 Suggestion · Prepared-mode rejection is retried as though acquisition failed
With prepared inputs and a differing existing working corpus, the shell retries a deterministic rejection ten times, adding about 196 seconds of backoff plus repeated hashing.
Location:
ci/test/03_test_script.sh:63(head).Review coverage was incomplete.
Reviewed:
4bdc3e2b380b· Review report · Previous reportspermalink
thx for working on this, but this is adding ~300 loc, which need to be reviewed, tested, and maintained (as they can contain bugs or require other changes in the future).
IIUC the issue they are trying to fix happened in two pull requests over the last year? It would be good to get an idea of how often this will fix an issue, so that it is clear that the time spent reviewing/maintaining this every year is less than the time it takes to click the re-run CI button every year.
On could also cache other stuff, like https://github.com/bitcoin/bitcoin/issues/33913#issue-3646740449, but this hasn't been done yet either, because it is not worth it.
It just depends how much importance one gives to determinism in tests. Obviously for a cryptographer's mind this is of paramount importance. Failing tests may also drive wrong decision making, re-runs feel like... switch it off and on again, see if that works 😅
Generally, the tests aren't meant to be 100% deterministic, but rather reproducible, so that failures are actionable. For example, the functional and unit tests can take a random seed, which is logged, for a bit of "property-based" testing. On any test failure, one should trivially see all the actions and inputs that lead to the failure and reproduce the exact failure.
The tests itself should never have any network access (https://github.com/bitcoin/bitcoin/pull/31349), so network io errors can only happen during CI runs. Those can happen in many different places: docker image cache, docker volume cache, package manager downloads, other dependency downloads,
dependsdownloads, previous-release bin downloads, unit test assets, fuzz test assets, ...Every week there are a few of those network failures, which is extremely annoying, but at the same time something that can't really be fixed: If a cache is created for one resource, then creating the cache can still fail, or downloading the cache itself may fail instead. Also, spotting network failures is generally easier to deal with than a real intermittent ci failure or some of the failures caused by corrupt VM hardware. See https://github.com/bitcoin/bitcoin/issues?q=is%3Aissue+state%3Aclosed+label%3A%22CI+failed%22
See e.g:
https://github.com/bitcoin/bitcoin/actions/runs/45420610531/job/138538761564?pr=36966#step:11:172
And an apt error earlier today, ...
Just for the larger picture, I asked DrahtBot to report all intermittent network issues and this one wasn't hit. Whereas there were many other network issues in other parts:
Using https://github.com/bitcoin-data/github-metadata-backup-bitcoin-bitcoin:
So if this is something to fix, the fix should give a substantial improvement in that problem area. 300LOC for something that doesn't dent the large picture doesn't seem worth it.
I'd say this should be closed, unless a real benefit can be shown.