feat(configs): point hermes at gitea admin/hermes ansible repos #11

Merged
admin merged 1 commits from hermes/brencher:feat/hermes-gitea-remotes into main 2026-09-05 19:19:25 +02:00
Contributor

Summary

Migrates backend/configs/hermes.py from the legacy url= form (pointing at the unreachable github.com/rudolf1/uber_backup.git) to the new remotes=[{name, url}, ...] form introduced by PR #3 (named-remotes), pointing at the actual gitea repos where the ansible stack lives.

What's in this PR

  • backend/configs/hermes.py — single file, +22/-1
    • GitClone(url="https://github.com/rudolf1/uber_backup.git"[, branchNamePrefix=...])
      →
      GitClone(remotes=[{"name": "gitea_hermes", "url": "https://gitea.rudolf.keenetic.link/hermes/ansible"}, {"name": "gitea_admin", "url": "https://gitea.rudolf.keenetic.link/admin/ansible"}])
    • branchNamePrefix is dropped (it would be a silent no-op: GitClone only applies its prefix refspec to a remote named origin per backend/steps/git.py ~L104, and neither remote here is named origin)

Why migrate

  • The old URL never resolved (uber_backup.git doesn't exist on gitea anyway) — so the deploy path was broken even though the file looked correct.
  • github.com returns HTTP 403 on CONNECT tunnel from the brencher container's egress proxy — verified in admin/brencher#4 (commit 653aee9).

Scope decision: only hermes.py

The other open configs (registry.py, gitea.py, hermes.py, immich.py, gmail_mcp.py, torrserv_proxy.py) are being migrated in separate PRs, one per file. Each PR has its own branch + verification.

Verification (sandbox, no docker daemon)

  • python3 -m py_compile backend/configs/hermes.py — OK
  • Real import via from configs import hermes:
    • clone.remotes is a 2-entry list [gitea_hermes, gitea_admin], clone.urls derived from it
    • no github.com substring anywhere in the constructed config
    • clone.branchNamePrefix == ''
  • pytest: 26/26 passed on the no-docker / no-playwright suite
  • mypy --no-incremental --follow-imports=silent: Success: no issues found in 1 source file
  • End-to-end smoke test: built a parallel GitClone(remotes=[...]) with both URLs pointed at file:///tmp/ansible-upstream, ran clone.progress():
    • both named remotes created in the temp clone
    • 4 branches discovered (master + feat/docker-socket-proxy × 2 remotes)
    • feat/docker-socket-proxy visible on both gitea_admin and gitea_hermes

What was NOT verified in the sandbox

  • HTTPS clone from gitea.rudolf.keenetic.link on the live brencher-bot — requires the brencher container's git credentials to have push rights on admin/ansible.
  • end-to-end docker stack deploy — needs a real swarm.

After merge

After this PR merges into admin/brencher:main, the next brencher deploy of this environment will clone from gitea instead of the unreachable github URL.

## Summary Migrates `backend/configs/hermes.py` from the legacy `url=` form (pointing at the unreachable `github.com/rudolf1/uber_backup.git`) to the new `remotes=[{name, url}, ...]` form introduced by PR #3 (named-remotes), pointing at the actual gitea repos where the ansible stack lives. ## What's in this PR - `backend/configs/hermes.py` — single file, +22/-1 - `GitClone(url="https://github.com/rudolf1/uber_backup.git"[, branchNamePrefix=...])` → `GitClone(remotes=[{"name": "gitea_hermes", "url": "https://gitea.rudolf.keenetic.link/hermes/ansible"}, {"name": "gitea_admin", "url": "https://gitea.rudolf.keenetic.link/admin/ansible"}])` - `branchNamePrefix` is dropped (it would be a silent no-op: `GitClone` only applies its prefix refspec to a remote named `origin` per `backend/steps/git.py` ~L104, and neither remote here is named `origin`) ## Why migrate - The old URL never resolved (`uber_backup.git` doesn't exist on gitea anyway) — so the deploy path was broken even though the file looked correct. - `github.com` returns HTTP 403 on CONNECT tunnel from the brencher container's egress proxy — verified in `admin/brencher#4` (commit `653aee9`). ## Scope decision: only `hermes.py` The other open configs (`registry.py`, `gitea.py`, `hermes.py`, `immich.py`, `gmail_mcp.py`, `torrserv_proxy.py`) are being migrated in **separate PRs**, one per file. Each PR has its own branch + verification. ## Verification (sandbox, no docker daemon) - `python3 -m py_compile backend/configs/hermes.py` — OK - Real import via `from configs import hermes`: - `clone.remotes` is a 2-entry list `[gitea_hermes, gitea_admin]`, `clone.urls` derived from it - no `github.com` substring anywhere in the constructed config - `clone.branchNamePrefix == ''` - pytest: **26/26** passed on the no-docker / no-playwright suite - mypy `--no-incremental --follow-imports=silent`: `Success: no issues found in 1 source file` - **End-to-end smoke test**: built a parallel `GitClone(remotes=[...])` with both URLs pointed at `file:///tmp/ansible-upstream`, ran `clone.progress()`: - both named remotes created in the temp clone - 4 branches discovered (`master` + `feat/docker-socket-proxy` × 2 remotes) - `feat/docker-socket-proxy` visible on both `gitea_admin` and `gitea_hermes` ## What was NOT verified in the sandbox - HTTPS clone from `gitea.rudolf.keenetic.link` on the live brencher-bot — requires the brencher container's git credentials to have push rights on `admin/ansible`. - end-to-end `docker stack deploy` — needs a real swarm. ## After merge After this PR merges into `admin/brencher:main`, the next brencher deploy of this environment will clone from gitea instead of the unreachable github URL.
hermes added 1 commit 2026-08-25 23:04:06 +02:00
backend/configs/hermes.py was using the legacy url=/branchNamePrefix= form
pointing at https://github.com/rudolf1/uber_backup.git. That URL never resolved
(uber_backup doesn't exist on gitea) and github.com itself is unreachable
from the brencher container (proxy HTTP 403 on CONNECT tunnel).

Switch to the new remotes=[{name,url},...] form introduced by PR #3
(named-remotes), pointing at the actual repos that exist:

  - gitea_hermes: https://gitea.rudolf.keenetic.link/hermes/ansible
  - gitea_admin:  https://gitea.rudolf.keenetic.link/admin/ansible

Same form used in backend/configs/brencher.py (after PR #3),
backend/configs/docker_socket_proxy.py (PR #4), and
backend/configs/hermes_infra.py (PR #8).

Verified locally (no docker daemon):
  - py_compile: OK
  - Real import: clone.remotes is 2-entry list [gitea_hermes, gitea_admin],
    no github.com anywhere
  - pytest: 26/26 on no-docker suite
  - mypy: Success: no issues found
  - End-to-end smoke test (GitClone.progress() against file:// mirror):
    both remotes created, feat/docker-socket-proxy visible on both
admin merged commit 694c28109d into main 2026-09-05 19:19:25 +02:00
admin deleted branch feat/hermes-gitea-remotes 2026-09-05 19:19:26 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/brencher#11