-
-
Notifications
You must be signed in to change notification settings - Fork 586
chore(databend): use Run function #3402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Rate limit exceeded@mdelapenya has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 36 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, 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 the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughRefactors Databend module to use testcontainers.Run with modular options, introduces post-start environment inspection to populate credentials, centralizes default port usage, updates error handling around Run/Inspect, and adds a test to validate erroring on empty credentials. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant Module as Databend Module
participant TC as testcontainers.Run
participant Ctr as Container
Caller->>Module: Start Databend(img, opts)
Module->>TC: Run(ctx, img, moduleOpts...)
alt Run success
TC-->>Module: Container handle
Module->>Ctr: Inspect()
Ctr-->>Module: Env (QUERY_DEFAULT_USER/PASSWORD)
Module->>Module: Update credentials from env
Module-->>Caller: DatabendContainer or error if creds empty
else Run failure
TC-->>Module: Error
Module-->>Caller: Partial DatabendContainer, wrapped error
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
modules/databend/databend.go(2 hunks)modules/databend/databend_test.go(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
modules/databend/databend_test.go (2)
modules/databend/databend.go (3)
Run(40-93)WithUsername(126-131)WithPassword(134-139)testing.go (1)
CleanupContainer(91-97)
modules/databend/databend.go (3)
options.go (3)
ContainerCustomizer(22-24)WithExposedPorts(454-459)WithWaitStrategy(366-368)wait/host_port.go (1)
ForListeningPort(67-69)modules/clickhouse/clickhouse.go (1)
Run(69-123)
What does this PR do?
Use Run function in the Databend module
Why is it important?
Migrate modules to the new API
Related issues