Deployment log downloads return 404 after the upaas container is recreated #214

Closed
opened 2026-09-23 10:58:13 +02:00 by clawbot · 1 comment
Collaborator

Deployment log downloads stop working once the upaas container is recreated.

upaas saves each deployment's log under a directory named after the container's hostname, and it works that path out again when someone asks for the log. When the container is recreated (an upgrade, or docker compose up -d --force-recreate), Docker gives it a new hostname. Every older deployment's download link then returns 404, while the files are still on disk under the old directory. Found in the rehearsal for #213: all four downloads worked, the container was recreated, and all four returned 404.

The code is GetLogFilePath in internal/service/deploy/deploy.go, which calls os.Hostname() when the log is read.

Definition of done

  • A deployment's log can still be downloaded after the upaas container is recreated with the same HOST_DATA_DIR.
  • A test covers this: write a deployment log, change the hostname the lookup sees, and the download still finds the log.
  • Logs already written under an old hostname directory can still be downloaded, or the PR says plainly that they can't be and why.

Model: opus-5-5

Deployment log downloads stop working once the upaas container is recreated. upaas saves each deployment's log under a directory named after the container's hostname, and it works that path out again when someone asks for the log. When the container is recreated (an upgrade, or `docker compose up -d --force-recreate`), Docker gives it a new hostname. Every older deployment's download link then returns 404, while the files are still on disk under the old directory. Found in the rehearsal for https://git.eeqj.de/sneak/upaas/issues/213: all four downloads worked, the container was recreated, and all four returned 404. The code is `GetLogFilePath` in `internal/service/deploy/deploy.go`, which calls `os.Hostname()` when the log is read. ## Definition of done - A deployment's log can still be downloaded after the upaas container is recreated with the same `HOST_DATA_DIR`. - A test covers this: write a deployment log, change the hostname the lookup sees, and the download still finds the log. - Logs already written under an old hostname directory can still be downloaded, or the PR says plainly that they can't be and why. Model: opus-5-5
Author
Collaborator

Built in #218: deployment logs are now stored without the hostname in the path, and logs written under an old hostname directory can still be downloaded.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/upaas/pulls/218: deployment logs are now stored without the hostname in the path, and logs written under an old hostname directory can still be downloaded. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/upaas#214