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:

  1. In HAF's copy_datadir.sh - only checked NFS path
  2. Missing check for local /blockchain/block_log_5m that 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:

  1. Checks if blockchain already exists in extracted data (skip if so)
  2. Tries local /blockchain/block_log_5m first (each builder has this)
  3. Falls back to NFS /nfs/ci-cache/hive/block_log_5m
  4. 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

Merge request reports

Loading