The master's Compose service and each agent's own Compose service can be updated like any other service (button, version picker, auto, webhook, poller). An agent's own Swarm service is still refused.
An agent updating itself runs docker compose up -d in a short-lived helper container (its own image, its own mounts, labels se.shcizo.package-updater.self-update.*). The new agent finds the helper at startup, resumes the job before its hello, and reports the real exit code and the pinned ref as a normal job.result. No hub, store or schema changes for this.
Jobs for an agent's own service run last, in the agent's queue and in the order the poller and webhook start jobs. Protocol version 4; any service running the AGENT_IMAGE repo is only routed to v4 agents, so an older agent can never stop itself.
go test -race ./internal/agent/... ./internal/master/... ./internal/e2e/
go test -tags integration ./internal/master/store/ against Postgres (not run; only the merge refusal reason changed in store)
Agent updates itself to a new digest: helper visible during the update, new agent container, job succeeded with repo:tag@digest, helper removed afterwards
Agent update with no new digest: the old agent reports, helper removed
Master updates itself: job succeeded once the master is back
Master and agent in auto, one push: master job first, agent job last, no job lost
Failed recreate: the old agent reports failed with the compose output and keeps running
Overview: badge "This agent" and a normal auto toggle on the agent's own row
## Summary
- The master's Compose service and each agent's own Compose service can be updated like any other service (button, version picker, auto, webhook, poller). An agent's own Swarm service is still refused.
- An agent updating itself runs `docker compose up -d` in a short-lived helper container (its own image, its own mounts, labels `se.shcizo.package-updater.self-update.*`). The new agent finds the helper at startup, resumes the job before its hello, and reports the real exit code and the pinned ref as a normal `job.result`. No hub, store or schema changes for this.
- Jobs for an agent's own service run last, in the agent's queue and in the order the poller and webhook start jobs. Protocol version 4; any service running the `AGENT_IMAGE` repo is only routed to v4 agents, so an older agent can never stop itself.
Closes #15
## Test plan
- [x] `go test ./...`
- [x] `go test -race ./internal/agent/... ./internal/master/... ./internal/e2e/`
- [ ] `go test -tags integration ./internal/master/store/` against Postgres (not run; only the merge refusal reason changed in store)
- [ ] Agent updates itself to a new digest: helper visible during the update, new agent container, job succeeded with `repo:tag@digest`, helper removed afterwards
- [ ] Agent update with no new digest: the old agent reports, helper removed
- [ ] Master updates itself: job succeeded once the master is back
- [ ] Master and agent in auto, one push: master job first, agent job last, no job lost
- [ ] Failed recreate: the old agent reports failed with the compose output and keeps running
- [ ] Overview: badge "This agent" and a normal auto toggle on the agent's own row
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
docker compose up -din a short-lived helper container (its own image, its own mounts, labelsse.shcizo.package-updater.self-update.*). The new agent finds the helper at startup, resumes the job before its hello, and reports the real exit code and the pinned ref as a normaljob.result. No hub, store or schema changes for this.AGENT_IMAGErepo is only routed to v4 agents, so an older agent can never stop itself.Closes #15
Test plan
go test ./...go test -race ./internal/agent/... ./internal/master/... ./internal/e2e/go test -tags integration ./internal/master/store/against Postgres (not run; only the merge refusal reason changed in store)repo:tag@digest, helper removed afterwards