fix: add is_server parameter to S3Storage.__init__#9114
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds an ChangesS3Storage Server Parameter Support
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
asset.py calls S3Storage(request=request, is_server=True) in three places (lines 337, 441, 565), but S3Storage.init in plane/settings/storage.py only accepts request=None — the is_server parameter was never added.
This causes a TypeError: S3Storage.init() got an unexpected keyword argument 'is_server' on every request that hits those asset endpoints, resulting in HTTP 500 errors for all asset operations (upload slot creation, presigned URL generation, attachment downloads) when USE_MINIO=1.
The fix adds is_server=False to init and updates the endpoint_url condition so server-side calls use AWS_S3_ENDPOINT_URL instead of deriving the host from the HTTP request object.
Type of Change
Screenshots and Media (if applicable)
N/A
Test Scenarios
References
Fixes #8680
Summary by CodeRabbit