a975cfde5b
gates / gates (push) Successful in 28s
Part 1: tandoor/zipline/wger probes corrected in the catalog and red-proofed live on 9202 in both directions - "Nem egeszseges" with the front door serving 200, then "Fut" after the real sync with no redeploy. tandoor's failed edge re-walked: done at +41.1s where it was failed at +361.9s. Part 2: fifteen proven versions on the live catalog, one commit per app; the guarded Update pressed on four apps on demo-hp, all four done. Opened: R-630 (paperless-ngx's probe has never run on any box - a silent absence, worse than the wrong probe that was found in one night), R-631 (five templates no static rule can judge), R-632 (28 of 53 templates never deployed by any drill). Closed: R-618. Register 318 -> 321. No product code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
52 lines
1.9 KiB
Python
52 lines
1.9 KiB
Python
#!/usr/bin/env python3
|
|
"""Point guest 9202 at the drill catalog, or back at the live one (09 §6.5, R-615).
|
|
|
|
`git.repo_url` alone is INERT: `Syncer.gitCloneOrPull` clones only when the cache has no `.git`,
|
|
otherwise it fetches from the remote the existing clone stores. The cache directory must be removed
|
|
too, or the box goes on following the live catalog AND REPORTS SUCCESS. That is R-615, and it is why
|
|
step 3 exists.
|
|
"""
|
|
import re, sys, io
|
|
sys.path.insert(0, '.')
|
|
import walk as w
|
|
|
|
VOL = "/var/lib/docker/volumes/felhom-controller-data/_data"
|
|
LIVE = "https://gitea.dooplex.hu/admin/app-catalog-felhom.eu.git"
|
|
DRILL_REPO = "https://gitea.dooplex.hu/admin/app-catalog-drill.git"
|
|
|
|
|
|
def creds():
|
|
for l in io.open("/home/kisfenyo/.git-credentials").read().strip().split("\n"):
|
|
m = re.match(r'https://(admin):([^@]+)@gitea\.dooplex\.hu', l)
|
|
if m:
|
|
return m.group(1), m.group(2)
|
|
raise SystemExit("no admin credential for gitea.dooplex.hu")
|
|
|
|
|
|
def repoint(to_drill):
|
|
u, t = creds() if to_drill else ("", "")
|
|
url = DRILL_REPO if to_drill else LIVE
|
|
script = f"""
|
|
set -e
|
|
test -f {VOL}/controller.yaml.pre-update-night || cp {VOL}/controller.yaml {VOL}/controller.yaml.pre-update-night
|
|
python3 - <<'EOF'
|
|
import re
|
|
p = "{VOL}/controller.yaml"
|
|
s = open(p).read()
|
|
s = re.sub(r'(^\\s+repo_url: ).*$', r'\\g<1>{url}', s, count=1, flags=re.M)
|
|
s = re.sub(r'(^\\s+token: ).*$', r'\\g<1>"{t}"', s, count=1, flags=re.M)
|
|
s = re.sub(r'(^\\s+username: ).*$', r'\\g<1>"{u}"', s, count=1, flags=re.M)
|
|
open(p, "w").write(s)
|
|
EOF
|
|
# R-615: the cache is the thing that actually decides which remote is fetched.
|
|
rm -rf {VOL}/catalog-cache {VOL}/data/catalog-cache
|
|
docker restart felhom-controller >/dev/null
|
|
sleep 12
|
|
grep -A6 '^git:' {VOL}/controller.yaml | sed 's/token:.*/token: <redacted>/'
|
|
"""
|
|
print(w.guest(script))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
repoint(sys.argv[1] == "drill")
|