feat: Migrate Aliyun OSS Bucket to Terraform-like state engine#145
Merged
feat: Migrate Aliyun OSS Bucket to Terraform-like state engine#145
Conversation
Co-authored-by: Blankll <28639911+Blankll@users.noreply.github.com>
…assertions Co-authored-by: Blankll <28639911+Blankll@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate Aliyun OSS bucket resource to Terraform-like state engine
feat: Migrate Aliyun OSS Bucket to Terraform-like state engine
Jan 5, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #145 +/- ##
==========================================
- Coverage 52.80% 50.93% -1.88%
==========================================
Files 120 126 +6
Lines 3613 3907 +294
Branches 881 982 +101
==========================================
+ Hits 1908 1990 +82
- Misses 1502 1712 +210
- Partials 203 205 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Blankll
requested changes
Jan 5, 2026
Comment on lines
+50
to
+63
| export const extractOssBucketDefinition = (config: OssBucketConfig): ResourceAttributes => { | ||
| return { | ||
| bucketName: config.BucketName, | ||
| acl: config.ACL ?? null, | ||
| websiteConfiguration: config.WebsiteConfiguration | ||
| ? { | ||
| indexDocument: config.WebsiteConfiguration.IndexDocument, | ||
| errorDocument: config.WebsiteConfiguration.ErrorDocument ?? null, | ||
| } | ||
| : {}, | ||
| storageClass: config.StorageClass ?? null, | ||
| domain: config.Domain ?? null, | ||
| }; | ||
| }; |
Member
There was a problem hiding this comment.
oss and cos should have same bucket defination, refactor to make oss and cos to reuse same logic.
Contributor
Author
There was a problem hiding this comment.
Refactored OssBucketConfig to use CommonBucketConfig from shared src/stack/bucketTypes.ts. OSS and COS now share the same base bucket configuration structure. Commit: 5166d83
Comment on lines
+50
to
+52
| beforeEach(() => { | ||
| jest.clearAllMocks(); | ||
| }); |
…and expand bucket info Co-authored-by: Blankll <28639911+Blankll@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ALIYUN_OSS_BUCKETtoResourceTypeEnuminsrc/types/domains/state.tsossOperations.tsinsrc/common/aliyunClient/- OSS SDK operations wrappersrc/common/aliyunClient/index.tsto use OSS operationsossTypes.ts- Type definitions for OSS bucket config and conversion functionsossResource.ts- CRUD lifecycle with state managementossPlanner.ts- Plan generation for bucket operationsossExecutor.ts- Plan execution for bucket operationssrc/stack/aliyunStack/index.tsto export new OSS modulesCode Review Feedback Addressed:
BucketACLenum insrc/stack/bucketTypes.tsCommonBucketConfig,CommonBucketInfo, andCommonBucketInstanceshared typesOssBucketInfoto include comprehensive bucket information (owner, storage class, data redundancy, CORS, lifecycle, logging, etc.)beforeEachtoafterEachinossPlanner.test.tsossTypes.tsSecurity Summary
No security vulnerabilities were discovered by CodeQL analysis.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.