Skip to content

fix(storage): support virtual-hosted S3 endpoints - #490

Merged
imshashank merged 3 commits into
mainfrom
fix/s3-endpoint-addressing
Sep 23, 2026
Merged

imshashank merged 3 commits into
mainfrom
fix/s3-endpoint-addressing

Conversation

@imshashank

@imshashank imshashank commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Custom S3 endpoints currently force path-style URLs, so Railway buckets that require virtual-hosted URLs receive incorrectly addressed requests. This adds the optional S3_FORCE_PATH_STYLE setting, accepting true or false, while preserving existing MinIO and AWS defaults when unset.

The change includes the storage factory, shared validator/export, example environment setting, provider documentation and storage regression tests.

Validation covers presigned upload/download addressing, unchanged custom-endpoint and AWS defaults, and rejection of invalid settings. Against the old factory, the two new behavior tests fail as expected. Full bun run verify passed on Linux with fresh isolated PostgreSQL: 5,839 tests passed, zero failed, and all static and type checks passed. GitHub CI passed, including both browser suites, build and migration validation.

Actual Railway bucket and deployment acceptance remains separate from local tests.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@github-actions github-actions Bot added documentation Docs, the README, or anything that explains Orbit tests Test coverage and test infrastructure area: realtime The socket, the hub, scopes and fan-out labels Sep 23, 2026
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Noveum/orbit/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: be2721b1-75ab-4b13-b730-edf65793a3fb

📥 Commits

Reviewing files that changed from the base of the PR and between 4f69832 and bba2c00.

📒 Files selected for processing (8)
  • .env.example
  • docs/object-storage.md
  • packages/core/tests/analytics/saved-view.test.ts
  • packages/realtime-server/tests/hub.test.ts
  • packages/services/src/storage/index.ts
  • packages/services/tests/storage/storage.test.ts
  • packages/shared/src/validators/index.ts
  • packages/shared/src/validators/storage.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds validated S3 path-style configuration, tests and documentation for storage URL addressing, and explicit timing and delta conditions in two existing tests.

Changes

S3 path-style configuration

Layer / File(s) Summary
Validate and apply path-style setting
packages/shared/src/validators/storage.ts, packages/shared/src/validators/index.ts, packages/services/src/storage/index.ts, .env.example
The shared validator accepts true or false and transforms the value to a boolean. createStorageDriver validates the optional setting and passes it to S3StorageDriver when defined. The example environment file includes the setting.
Cover and document addressing behavior
packages/services/tests/storage/storage.test.ts, docs/object-storage.md
Tests cover custom endpoint and AWS URL styles, accepted and rejected values, and upload and download URLs. The documentation describes the S3 settings, addressing behavior, and operational guidance.

Test timing and delta matching

Layer / File(s) Summary
Make test conditions explicit
packages/core/tests/analytics/saved-view.test.ts, packages/realtime-server/tests/hub.test.ts
The analytics test supplies issue timestamps and a checkpoint capture time. The realtime test waits for a delta containing the expected issue update.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to 4c490

The new setting preserves the documented addressing defaults unless explicitly configured, and no actionable merge-blocking issue is established. Merge after normal checks.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: support for virtual-hosted S3 endpoints.
Description check ✅ Passed The description explains the storage setting, defaults, validation, documentation, tests, and deployment-testing limits. It is directly related to the changeset.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
orbit Ready Ready Preview Sep 23, 2026 8:41am UTC

Request Review

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@github-actions github-actions Bot removed the area: realtime The socket, the hub, scopes and fan-out label Sep 23, 2026
@imshashank
imshashank merged commit b41487d into main Sep 23, 2026
17 checks passed
@imshashank
imshashank deleted the fix/s3-endpoint-addressing branch September 23, 2026 08:42

This branch was successfully deployed

1 active deployment
Preview — 4c490b4c Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Docs, the README, or anything that explains Orbit tests Test coverage and test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant