Skip to content

fix(enterprise): support virtual hosted and path-style S3 endpoints#15418

Open
geidsonc wants to merge 1 commit intoanomalyco:devfrom
geidsonc:fix/enterprise-s3-endpoint-style
Open

fix(enterprise): support virtual hosted and path-style S3 endpoints#15418
geidsonc wants to merge 1 commit intoanomalyco:devfrom
geidsonc:fix/enterprise-s3-endpoint-style

Conversation

@geidsonc
Copy link

@geidsonc geidsonc commented Feb 28, 2026

Issue for this PR

Closes #7808

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The enterprise package storage for /share API only supported path-style S3 URLs. This caused issues with S3-compatible providers that use virtual hosted-style URLs.

Then this PR add support for virtual hosted style for S3 providers and maintains current support for path-style.

The changes:

  • Added OPENCODE_STORAGE_ENDPOINT environment variable to allow custom S3 endpoints
  • Added logic to detect if the endpoint already includes the bucket name (virtual hosted style) vs. needs the bucket appended (path style)

How did you verify your code works?

You should test locally with your S3 provider using virtual hosted-style endpoint

Screenshots / recordings

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

- Add OPENCODE_STORAGE_ENDPOINT env var for custom S3-compatible services
- Detect endpoint format (virtual hosted vs path style) automatically
- Add service: "s3" to AwsClient for S3-compatible providers
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Feb 28, 2026
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Feb 28, 2026
@github-actions
Copy link
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

[FEATURE]: Support for private storage backends (S3/Object Storage) for the /share command

1 participant