The agent gives compose.override.yaml the owner of the existing override, or of the stack's first compose file when there is none or the existing one is root-owned (files written by earlier agent versions are fixed on the next job).
The owner is set on the temp file through its open handle before the rename, so a path swapped for a symlink cannot redirect the chown.
A failure to read or set the owner is a warning: line in the job output; the job still succeeds. No Warn log line: the Compose executor has no logger, and the job output is stored on the master.
go test ./..., go test -race ./internal/agent/..., GOOS=linux go vet ./internal/agent/...
On the server: a stack with a root-owned override gets the compose file's uid:gid after one Update, with no warning
A manually chowned (non-root) override keeps its owner after another Update
## Summary
- The agent gives `compose.override.yaml` the owner of the existing override, or of the stack's first compose file when there is none or the existing one is root-owned (files written by earlier agent versions are fixed on the next job).
- The owner is set on the temp file through its open handle before the rename, so a path swapped for a symlink cannot redirect the chown.
- A failure to read or set the owner is a `warning:` line in the job output; the job still succeeds. No Warn log line: the Compose executor has no logger, and the job output is stored on the master.
Closes #24
## Test plan
- [x] `go test ./...`, `go test -race ./internal/agent/...`, `GOOS=linux go vet ./internal/agent/...`
- [ ] On the server: a stack with a root-owned override gets the compose file's uid:gid after one Update, with no warning
- [ ] A manually chowned (non-root) override keeps its owner after another Update
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
compose.override.yamlthe owner of the existing override, or of the stack's first compose file when there is none or the existing one is root-owned (files written by earlier agent versions are fixed on the next job).warning:line in the job output; the job still succeeds. No Warn log line: the Compose executor has no logger, and the job output is stored on the master.Closes #24
Test plan
go test ./...,go test -race ./internal/agent/...,GOOS=linux go vet ./internal/agent/...