Add Test dockerscript for rustfs#65
Conversation
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 54 minutes and 10 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR introduces ChangesRustFS Client and Testing
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
a664e76 to
9b1ec88
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@client/rustfs.go`:
- Around line 9-12: The build is failing because client/rustfs.go imports
github.com/aws/aws-sdk-go-v2 modules (aws, config, credentials, service/s3) but
go.mod lacks those requirements; update the module dependencies by adding the
aws-sdk-v2 packages to go.mod (e.g., run `go get
github.com/aws/aws-sdk-go-v2@latest` for the needed submodules or add the
specific versions) then run `go mod tidy` to update go.mod and go.sum, verify
the package (client/rustfs.go) builds, and commit the updated go.mod and go.sum.
- Around line 50-62: Remove the test/debug bucket creation from the RustFSClient
constructor: delete the CreateBucket calls that use hardcoded names, the
fmt.Println(bucks) debug print, and the extra return that constructs a new
RustFSClient instead of returning the existing newCLI; if bucket initialization
is required, implement a separate method like EnsureBuckets(ctx, buckets
[]string) error that calls CreateBucket and returns on the first non-nil error
(do not overwrite or ignore err), and update the constructor to simply return
newCLI (and any constructor-level errors) without side-effectful I/O or silent
error swallowing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d4110205-e7a7-4e8d-8f51-9e94cfe2e352
📒 Files selected for processing (2)
client/rustfs.gotests/docker-compose.test.yml
9b1ec88 to
2923f85
Compare
2923f85 to
1198a35
Compare
kwonkwonn
left a comment
There was a problem hiding this comment.
공식 문서상 aws-s3-sdk 와 완전히 compatible 하다고 합니다.
그래서 aws-s3-sdk 를 가져다 쓸 예정이고, list 및 bucket 생성은 컨트롤에서
업로드 및 다운로드는 preasigned link 를 코어에 넘기는 방식으로 할 예정입니다
| module github.com/easy-cloud-Knet/KWS_Control | ||
|
|
||
| go 1.23.0 | ||
| go 1.24 |
There was a problem hiding this comment.
1.23.0 <-> aws sdk 와 호환성 문제가 있어서 업데이트 했는데 혹시 관련해서 문제 있을까요
| endpoint := os.Getenv("RUSTFS_ENDPOINT") | ||
| if endpoint == "" { | ||
| endpoint = "http://localhost:9001" | ||
| } |
There was a problem hiding this comment.
minioadmin<-- docker-compose.test.yaml 파일의 인자를 일단 덮어쓰도록 했습니다.
control 단에서 accesskey 넘어가는건 마지막 단계에서 할 거 같아요
Summary
Closes #64 — Story 1: rustfsClient 구현 및 테스트 환경 구성
client/rustfs.go: aws-sdk-go-v2 기반 RustFS 클라이언트 구현
Test plan
docker compose -f docker-compose.test.yml up --build 실행 후 kws-test-rustfs healthy 확인
NewRustFSClient() 호출 시 버킷 생성 및 ListBuckets() 반환값 로그 확인
Presigned URL로 Core에서 추가 인증 없이 업로드/다운로드 가능 여부 확인
Out of scope (후속 태스크)
Service 레이어 연동 (Story 2)
Repository / DB 스키마 (별도 태스크)
동기/비동기 처리 방식 확정 (Story 3)
notes
go.mod 및 dockerfile 에 변화가 있었습니다.
aws-sdk import 중에 발생했는데 특정 버전에 sdk 를 맞추는것도 좋지 않아보여서 업데이트했습니다.
혹시 관련하여 우려사항 있다면 알려주세용
Type of Change
Testing
Checklist
Summary by CodeRabbit