Skip to content

fix(file-service): restore configured S3 uploads - #267

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787696698-file-upload-s3-fix
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787696698-file-upload-s3-fix

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 25, 2026

Copy link
Copy Markdown

Summary

  • Symptom / blast radius: file uploads return 500 storage_error for every user running the affected file-service image because S3 writes are redirected away from the configured bucket.
  • Root cause (config/env): the production image defaults FILE_UPLOAD_ALWAYS_FAIL=true; upload_file therefore selects otterworks-files-chaos-nonexistent instead of S3_BUCKET.
  • Fix: remove the image-level default while preserving explicit runtime overrides, and add a regression guard that rejects truthy Docker ENV defaults in assignment, legacy, multi-variable, quoted, and continued forms.
  • Verification: cargo test (26 passed), cargo fmt --check, cargo clippy --all-targets -- -D warnings, and green CI. A rebuilt image has no baked upload-failure default; the browser upload returned HTTP 201, LocalStack S3 gained one 77-byte object byte-identical to the source, and the file loaded through Search and its detail/download flow. The explicit runtime override still reproduces the failure without writing an object. Screen recording.

Independent incident run; compare with #266. This implementation keeps the runtime failure switch available but prevents the production image from enabling it by default.

Unrelated follow-up: the Files grid fetches only its first 50 results and sorts that page client-side, so a just-uploaded file in this large seeded drive is visible through Search but not the grid.

Link to Devin session: https://app.devin.ai/sessions/6c565ca90fd4476dbe269672de1bd6ba


Devin Review

Status Commit
⚪ Not started

Run Devin Review

Devin Review (Staging)
Open in Devin Review

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration
devin-ai-integration Bot requested a review from a team August 25, 2026 22:28
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Open in Devin Review

Comment thread services/file-service/Dockerfile
Comment thread services/file-service/src/config.rs
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.

0 participants