Skip to content

feat: mount authorized msg resources as a read-only FUSE filesystem #391

feat: mount authorized msg resources as a read-only FUSE filesystem

feat: mount authorized msg resources as a read-only FUSE filesystem #391

name: Issue recovery regressions
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: issue-recovery-${{ github.ref }}
cancel-in-progress: true
jobs:
focused:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: msgtest
POSTGRES_PASSWORD: msgtest
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U msgtest"
--health-interval 5s --health-timeout 5s --health-retries 10
valkey:
image: valkey/valkey:9.0.6
ports:
- 6379:6379
options: >-
--health-cmd "valkey-cli ping"
--health-interval 5s --health-timeout 5s --health-retries 10
env:
MSG_TEST_POSTGRES_URL_TEMPLATE: postgresql://msgtest:msgtest@127.0.0.1:5432/{database}
MSG_TEST_VALKEY_URL: redis://127.0.0.1:6379/0
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-python@v7
with:
python-version: '3.15'
allow-prereleases: true
cache: pip
- name: Install recovery tools and project dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq postgresql-client-16 age libpcsclite-dev swig
echo /usr/lib/postgresql/16/bin >> "$GITHUB_PATH"
python -m pip install -e '.[dev]'
- name: Record the exact tested source
env:
EVENT_HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
mkdir -p artifacts
python - <<'PY'
import json, os, platform, subprocess
from pathlib import Path
def git(*args):
return subprocess.check_output(['git', *args], text=True).strip()
Path('artifacts/source.json').write_text(json.dumps({
'head_sha': os.environ['EVENT_HEAD_SHA'],
'checkout_sha': git('rev-parse', 'HEAD'),
'tree_sha': git('rev-parse', 'HEAD^{tree}'),
'run_id': os.environ['GITHUB_RUN_ID'],
'attempt': os.environ['GITHUB_RUN_ATTEMPT'],
'python': platform.python_version(),
'scope': 'isolated-postgresql-regressions-not-production'
}, indent=2) + '\n')
PY
- name: Exercise real PostgreSQL recovery regressions
run: >-
python -m pytest tests/test_recovery_current_authority.py
tests/test_task_a_recovery_checkpoint.py tests/test_backup_retirement_attestation.py
tests/test_backup_retirement_cli.py tests/test_recovery_policy_v2.py
tests/test_recovery_authority_reconcile.py tests/test_complete_recovery_proof.py
--junitxml=artifacts/recovery-current.xml
- uses: actions/upload-artifact@v7.0.1
if: always()
with:
name: issue-recovery-evidence
path: artifacts/
if-no-files-found: error