Skip to content

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

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

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787677253-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: All file uploads built from the affected file-service image return 500 storage_error after S3 rejects writes to a nonexistent bucket.
  • Root cause (config/env): The production image sets FILE_UPLOAD_ALWAYS_FAIL=true, overriding the safe application default and redirecting every upload away from S3_BUCKET.
  • Fix: Remove the image-level override so upload_file uses the configured S3 bucket, and add a regression guard that rejects truthy Dockerfile defaults across supported ENV forms.
  • Verification: Rebuilt the image and recreated file-service with FILE_UPLOAD_ALWAYS_FAIL fully unset so Compose could not mask the image default. bright circle.jpg uploaded successfully through the web UI, returned 201, rendered from otterworks-files, downloaded with matching bytes, and existed in LocalStack. cargo test, cargo fmt --check, and cargo clippy --all-targets -- -D warnings pass. Screen recording.

Independent incident run; compare with #261, which addresses the same outage and uses the same hardened Dockerfile guard scope.

Link to Devin session: https://app.devin.ai/sessions/291490b52e1d4ef4acc47eaac7e35e1c


Devin Review

Status Commit
⚪ Not started

Run Devin Review

Devin Review (Staging)

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration
devin-ai-integration Bot requested a review from a team August 25, 2026 17:02
@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 1 potential issue.

Open in Devin Review

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