Repository navigation
feat: Add Tencent COS cloud storage foundation - #4846
Metaildust wants to merge 5 commits into
Conversation
|
I took a look at the remaining failing checks after the
They fail while building the test Docker image in RUN apt-get install -y --no-install-recommends firefoxThe failing logs report: Since the failure happens before the new COS package is exercised, this looks like a repository / CI environment issue rather than a regression introduced by this PR. |
Phase 2 summaryThis phase closes the remaining Tencent COS integration gaps without expanding the scope to multipart uploads, STS credentials, or stronger verify semantics.
Verification
|
Introduce a standalone COS provider that uses native COS signatures instead of the S3 compatibility layer, so the server-side storage baseline can be reviewed before direct upload support lands.
Add the package-level license file required by pub publish validation so the COS foundation package can pass the monorepo publish check.
Complete the COS provider so clients can upload files through Serverpod's standard direct-upload flow while preserving COS-specific overwrite and host semantics.
Align internal COS operations with bucket-endpoint semantics, add native integration coverage and CI wiring, and document the provider's configuration and lifecycle behavior.
Regenerate the COS integration pubspec after rebasing onto the latest main branch so the generated package versions match the current Serverpod release line and the update pubspecs check passes.
5eabb71 to
19d7009
Compare
|
@nielsenko Ready for reviewing |
|
One documentation-related note: I do have more detailed usage documentation in my community package docs, and I think parts of that can be useful as source material for future official docs. The current package name there is That said, I do not think it should be copied over directly as-is, because there are a few important differences from the official implementation in this PR:
|
|
There is one remaining package-ownership issue we need to resolve before the official I have already sent an email from the original package-owner address At the moment, I see two possible solutions:
If there is any trust concern around temporary publisher admin access, I recommend option 2. In practice, a jointly-sent email is usually the safer path for completing this kind of transfer. Please reply by email as soon as possible. We should keep the discussion on email because, whether the package is transferred via pub.dev support or via a temporary admin-permission workflow, it is best to preserve a traceable written record to reduce legal and ownership risk. |
|
hi @nielsenko. If it's busy, please let me know when will this review be handled, so that I can do my schedule. Thanks! |
Summary
serverpod_cloud_storage_cospackage, template entry, and publishable package registration so Tencent COS can be reviewed as a first-class provider in the monorepo.CosCloudStoragewith COS-native signing and server-sidestoreFile,storeFileWithOptions,retrieveFile,fileExists,deleteFile, andgetPublicUrlsupport.preventOverwritetox-cos-forbid-overwrite, validatecontentLengthon the server upload path, and add tests covering the signer, public URL rules, path normalization, and the intentionally deferred direct upload APIs.Overall Rollout
FileUploader/ upload verification closure, broader integration coverage, and the final user-facing README details.Phase 1 Scope
serverpod_cloud_storage_s3_compat, since COS requires its own signature model and COS-specific overwrite semantics.SERVERPOD_COS_ACCESS_KEY_ID/COSAccessKeyIdandSERVERPOD_COS_SECRET_KEY/COSSecretKey, while keeping the legacy aliases as compatibility fallbacks.createDirectFileUploadDescriptionandcreateDirectFileUploadDescriptionWithOptionsintentionally unimplemented for now; both returnnulland are covered by tests so the current boundary is explicit.Test plan
dart format lib/ test/dart analyzedart test