Repository navigation
feat: add Presto module - #3778
Conversation
Part of the broader effort to add missing modules — split from testcontainers#3762.
|
Warning Review limit reached
Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
✨ 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 |
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ba55d3ca1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| starting, _ := info["starting"].(bool) | ||
| return !starting |
There was a problem hiding this comment.
Wait until Presto can execute queries
When a test opens a Presto client and sends a query immediately after Run, this readiness check can still return too early: /v1/info with starting=false only proves the server/catalog loading phase is done, not that the single worker has registered and can accept scheduled work. With the stock prestodb/presto container this startup race is known to produce No nodes available to run query for the first query (see prestodb/presto#23226), and the new test only checks the URL prefix so it would not catch it. Please make the wait strategy prove query readiness, e.g. by polling a lightweight statement or active-worker state before returning.
Useful? React with 👍 / 👎.
| return "", fmt.Errorf("get mapped port: %w", err) | ||
| } | ||
|
|
||
| return fmt.Sprintf("http://%s:%s", host, port.Port()), nil |
There was a problem hiding this comment.
Build the HTTP endpoint with PortEndpoint
When the Docker host is configured as an IPv6 literal, for example via TESTCONTAINERS_HOST_OVERRIDE=::1, this formatting returns an invalid URL like http://::1:12345; callers cannot parse or dial it. The core DockerContainer.PortEndpoint helper already uses net.JoinHostPort to produce http://[::1]:12345, so this module should use that helper (or equivalent bracketing) for the HTTP connection string.
Useful? React with 👍 / 👎.
- P2 #1: Replace single /v1/info wait with wait.ForAll combining /v1/info (starting=false) and /v1/cluster (activeWorkers>0). This eliminates the known 'No nodes available' startup race. - P2 #2: Use c.PortEndpoint(ctx, httpPort, "http") in ConnectionString instead of manual fmt.Sprintf, fixing IPv6-host formatting. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Addressed both P2 findings in commit 461b470 on P2 #1 (line 57 — worker readiness): Wait strategy now uses P2 #2 (line 38 — IPv6): |
Adds the
prestotestcontainers-go module.Part of the broader effort to add missing modules — split from #3762.