fix: support both HAF-style and app-style pgdata paths

Summary

  • Fix extract-test-cache.sh to detect valid PostgreSQL data in both HAF-style (datadir/haf_db_store/pgdata) and app-style (datadir/pgdata) directory structures.

Problem

Hivemind uses HAF base layer cache which stores pgdata at datadir/haf_db_store/pgdata, but the script was only checking datadir/pgdata. This caused the valid data check to fail, leading to:

  1. Script decides data doesn't exist (wrong path check)
  2. Script deletes the directory to extract fresh
  3. PostgreSQL (already running from service container) crashes because its data was deleted
  4. Test jobs fail with "Connection refused"

Fix

Check both possible pgdata locations:

  1. ${DEST_DIR}/datadir/haf_db_store/pgdata (HAF-style, hivemind)
  2. ${DEST_DIR}/datadir/pgdata (app-style, balance_tracker, reputation_tracker)

Related: hivemind !975

Merge request reports

Loading