Files
cc-ci-orchestrator/memory/drone-sqlite-log-extraction.md
autonomic-bot 542ed0afe3 memory: move agent memory into repo (memory/), note in AGENTS.md
Persistent agent memories now live in memory/ in this repo; the Claude
auto-memory path is symlinked here so future memories land in the repo
and get committed like any other change.
2026-06-09 19:25:20 +00:00

15 lines
969 B
Markdown

---
name: drone-sqlite-log-extraction
description: How to read full drone CI step logs on cc-ci — copy /data/database.sqlite from the drone container and query it
metadata:
node_type: memory
type: reference
originSessionId: 85355980-5e4f-4f90-b1ca-d0e4fe82f04b
---
Drone on cc-ci has no on-disk logs and no API token handy. To get full step logs:
1. `ssh cc-ci 'docker cp $(docker ps -qf name=drone):/data/database.sqlite /tmp/drone.sqlite'` then scp to orchestrator (no python3 on cc-ci PATH).
2. Query with python3 sqlite3: `builds` (build_number → build_id) → `stages` (stage_build_id) → `steps` (step_stage_id) → `logs` where log_id = step_id; `log_data` is a JSON array of `{pos,out,time}` lines.
**Why:** this is how the real root cause of immich CI builds 229/230 ("bash: /pg_backup.sh: No such file or directory" in the backup hook) was found after results.json/junit gave only the assertion failure. Related: [[shared-recipe-checkout-race]]