From 070689d5086633f3097d30084849d92e23c6ae1b Mon Sep 17 00:00:00 2001 From: Jonathan Branan Date: Tue, 27 Oct 2026 01:07:37 -0500 Subject: [PATCH] ci: one-off komodo stack diagnostic --- .gitea/workflows/komodo-check.yml | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .gitea/workflows/komodo-check.yml diff --git a/.gitea/workflows/komodo-check.yml b/.gitea/workflows/komodo-check.yml new file mode 100644 index 0000000..ef7edf4 --- /dev/null +++ b/.gitea/workflows/komodo-check.yml @@ -0,0 +1,53 @@ +name: komodo-check + +# One-off diagnostic: lists Komodo stacks and reports the qbit-maid stack's +# auto_pull setting. Safe to delete after use. + +on: + push: + branches: + - komodo-check + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Query Komodo + env: + KOMODO_URL: '${{ secrets.KOMODO_URL }}' + KOMODO_API_KEY: '${{ secrets.KOMODO_API_KEY }}' + KOMODO_API_SECRET: '${{ secrets.KOMODO_API_SECRET }}' + run: | + set -eu + KOMODO_URL="${KOMODO_URL%/}" + api() { + curl -sS -X POST "${KOMODO_URL}$1" \ + -H 'Content-Type: application/json' \ + -H "x-api-key: ${KOMODO_API_KEY}" \ + -H "x-api-secret: ${KOMODO_API_SECRET}" \ + -d "$2" + } + + echo "===== ListStacks =====" + api /read/ListStacks '{}' > /tmp/stacks.json + python3 - <<'PY' + import json + d = json.load(open('/tmp/stacks.json')) + if isinstance(d, dict): + print("unexpected dict:", list(d)[:10]) + else: + for s in d: + print(f" name={s.get('name')!r} id={s.get('id')!r} server={s.get('server_id')!r}") + PY + + echo "===== GetStack qbit-maid =====" + api /read/GetStack '{"stack":"qbit-maid"}' > /tmp/stack.json + python3 - <<'PY' + import json + d = json.load(open('/tmp/stack.json')) + cfg = d.get('config', {}) if isinstance(d, dict) else {} + print(" name:", d.get('name')) + print(" auto_pull:", cfg.get('auto_pull')) + print(" server_id:", d.get('server_id')) + print(" config keys:", sorted(cfg.keys())) + PY