Add shared block_log linking for HAF cache extraction
Summary
Consolidates the block_log fallback logic in cache-manager instead of having it duplicated in each HAF app's CI scripts.
Problem
When HAF caches are created, the blockchain directory is excluded to save ~1.7GB per cache. The fallback logic to find and link the shared block_log was:
- In HAF's
copy_datadir.sh- only checked NFS path - Missing check for local
/blockchain/block_log_5mthat each builder has
This caused sync job failures when NFS block_log wasn't available, even though local block_log existed.
Solution
Add _link_shared_block_log() function to cache-manager that:
- Checks if blockchain already exists in extracted data (skip if so)
- Tries local
/blockchain/block_log_5mfirst (each builder has this) - Falls back to NFS
/nfs/ci-cache/hive/block_log_5m - Creates symlinks in
datadir/blockchain
Called automatically after extraction for all haf* cache types.
Benefits
- All HAF apps (haf_block_explorer, balance_tracker, hivemind, etc.) get the fix
- Local block_log is preferred over NFS (faster)
- Logic is centralized in cache-manager