Skip to content

fix(mounts): write file mounts as files on create - #5791

Merged
narcisonunez merged 3 commits into
canaryfrom
fix/5292-compose-file-mounts
Oct 26, 2026
Merged

narcisonunez merged 3 commits into
canaryfrom
fix/5292-compose-file-mounts

Conversation

@narcisonunez

@narcisonunez narcisonunez commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

What is this PR about?

Two bugs when creating a file mount:

  • Without filePath (possible via the API), the content was written over the service's whole files/ directory. It's now rejected.
  • If the stack was deployed before the mount existed, Docker had already created the path as an empty directory, so writing the file failed (EISDIR) while the mount was still saved. The stale directory is now replaced, as updateFileMount already does.

Checklist

Issues related (if applicable)

closes #5292

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge; no new actionable issues were found.

Summary

This PR rejects missing or unsafe file paths and replaces empty directories Docker created with files.

  • File mounts stay within the service’s files folder.
  • File mounts replace Docker’s empty placeholder with the configured file.

Reviews (3) · Last reviewed commit: "fix(mounts): validate file paths on upda..." · Reviewed by Greptile

@narcisonunez
narcisonunez merged commit d18c110 into canary Oct 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compose file-type mounts materialize as empty directories instead of files

2 participants