Conversation
|
Summary:
|
|
@amirmalka any idea why the tests are failing? |
|
Summary:
|
|
@amirmalka I don't know why the system tests fail... can you have a look when you're back? |
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
|
Warning Rate limit exceeded
⌛ 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. 📝 WalkthroughWalkthroughgo.mod and tests/go.mod files updated with newer versions of key dependencies including Apache Pulsar client (v0.12.1→v0.16.0), testcontainers (v0.33.0→v0.35.0), Google Cloud libraries, AWS SDK v2 stack, and numerous transitive dependencies. Several obsolete libraries removed. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@go.mod`:
- Around line 27-28: Update the testcontainers k3s module version to match the
core package: change the dependency for
"github.com/testcontainers/testcontainers-go/modules/k3s" from v0.33.0 to
v0.35.0 so it aligns with "github.com/testcontainers/testcontainers-go v0.35.0";
this ensures the k3s module is compatible with the core API changes (e.g.,
Terminate signature and BuildLogWriter) and avoids version mismatch issues.
In `@tests/go.mod`:
- Around line 18-19: Update the test go.mod to pin the testcontainers k3s module
to the same version as the core library: change the module entry for
"github.com/testcontainers/testcontainers-go/modules/k3s" from v0.33.0 to
v0.35.0 so it matches "github.com/testcontainers/testcontainers-go v0.35.0".
| github.com/testcontainers/testcontainers-go v0.35.0 | ||
| github.com/testcontainers/testcontainers-go/modules/k3s v0.33.0 |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
testcontainers-go k3s module v0.35.0 compatibility
💡 Result:
In testcontainers-go v0.35.0, the K3s module is supported and ships in-repo (it has existed since v0.21.0) and you use it by importing github.com/testcontainers/testcontainers-go/modules/k3s and starting it via k3s.Run(...) (the Run entrypoint is documented as available since v0.32.0). [1][2]
K3s image compatibility: the module is designed to run whatever rancher/k3s:<tag> image you pass in (the docs show examples like rancher/k3s:v1.27.1-k3s1). [1][3]
Environment compatibility constraints (common “it doesn’t work” cases): K3s runs as a privileged container and needs to be able to spawn containers, so it may not work in rootless Docker, Docker-in-Docker, or other environments where privileged containers are disallowed. [4]
v0.35.0-specific note: v0.35.0 introduced core breaking changes (not K3s-specific), notably container.Terminate(ctx) gaining variadic termination options and a change from ShouldPrintBuildLog to BuildLogWriter for Dockerfile builds—these can affect compilation if your test harness uses those APIs. [2]
Sources:
[1] https://golang.testcontainers.org/modules/k3s/
[2] https://github.com/testcontainers/testcontainers-go/releases/tag/v0.35.0
[3] https://testcontainers.com/modules/k3s/
[4] https://java.testcontainers.org/modules/k3s/
🌐 Web query:
testcontainers-go/modules/k3s version release history
💡 Result:
testcontainers-go/modules/k3s (Go) – version/release history (highlights)
Module-level milestones are tracked as part of the main github.com/testcontainers/testcontainers-go release versions:
| Testcontainers-Go version | K3s module change |
|---|---|
| v0.21.0 | K3s module exists (“Since v0.21.0”); GetKubeConfig available. [2] |
| v0.25.0 | (*K3sContainer).LoadImages(...) added. [1], [2] |
| v0.29.0 | WithManifest(manifestPath) option added. [1], [2] |
| v0.32.0 | Run(ctx, img, ...) entrypoint added (and RunContainer later marked deprecated). [1], [2] |
| v0.39.0 | (*K3sContainer).LoadImagesWithOpts(...) added. [1] |
| v0.40.0 (latest shown on GitHub releases page, Nov 6, 2025) | Repo-wide module migration work includes “k3s: use Run function” (PR #3413). [3] |
Sources: pkg.go.dev API “added in vX.Y.Z” annotations for modules/k3s [1], Testcontainers-Go K3s module docs [2], and testcontainers-go GitHub releases page (latest + v0.40.0 notes) [3].
🌐 Web query:
testcontainers-go v0.35.0 k3s module version requirements
💡 Result:
For testcontainers-go v0.35.0, the K3s module is a separate Go module you depend on as:
github.com/testcontainers/testcontainers-go/modules/k3s@v0.35.0(published Jan 10, 2025) [1][2]
In practice, that means:
- Pinning
modules/k3sto v0.35.0 will also pull in the matching testcontainers-go v0.35.0 dependency (because the module lives in the same repo/version line) [2]. - Your project will also need Kubernetes client libraries (e.g.,
k8s.io/client-go,k8s.io/api,k8s.io/apimachinery) as shown by the module’s documented usage/imports [3].
I wasn’t able to fetch the exact modules/k3s v0.35.0 go.mod contents (to list the precise Go version / exact dependency version pins) from the available sources here, because the go.mod link resolves to GitHub content that failed to load in this environment [2]. If you paste the go.mod (or tell me your go env GOPROXY), I can extract the exact version requirements precisely.
Sources: [1] [2] [3]
Align K3s module version to match core v0.35.0.
The K3s module is pinned to v0.33.0 while the core is at v0.35.0. Since both are part of the same testcontainers-go repository and versioned together, they should match. The v0.35.0 release introduced breaking changes to the core API (Terminate signature and ShouldPrintBuildLog → BuildLogWriter), which the v0.33.0 K3s module may not account for. Update modules/k3s to v0.35.0 to ensure compatibility.
Fix
- github.com/testcontainers/testcontainers-go/modules/k3s v0.33.0
+ github.com/testcontainers/testcontainers-go/modules/k3s v0.35.0📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| github.com/testcontainers/testcontainers-go v0.35.0 | |
| github.com/testcontainers/testcontainers-go/modules/k3s v0.33.0 | |
| github.com/testcontainers/testcontainers-go v0.35.0 | |
| github.com/testcontainers/testcontainers-go/modules/k3s v0.35.0 |
🤖 Prompt for AI Agents
In `@go.mod` around lines 27 - 28, Update the testcontainers k3s module version to
match the core package: change the dependency for
"github.com/testcontainers/testcontainers-go/modules/k3s" from v0.33.0 to
v0.35.0 so it aligns with "github.com/testcontainers/testcontainers-go v0.35.0";
this ensures the k3s module is compatible with the core API changes (e.g.,
Terminate signature and BuildLogWriter) and avoids version mismatch issues.
| github.com/testcontainers/testcontainers-go v0.35.0 | ||
| github.com/testcontainers/testcontainers-go/modules/k3s v0.33.0 |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
testcontainers-go v0.35.0 modules k3s compatibility version
💡 Result:
In testcontainers-go v0.35.0, the k3s module does not hard-pin a specific K3s/Kubernetes version—you choose the K3s version by passing the Docker image tag to k3s.Run(ctx, img, ...) (i.e., it’s compatible with whatever valid rancher/k3s:<tag> image you supply). The docs’ example uses rancher/k3s:v1.27.1-k3s1. [1] [2]
So the “compatibility version” is: user-selected via the image tag (commonly rancher/k3s:v1.27.1-k3s1 in the v0.35.0 docs/examples). [1] [2]
Sources: [1] [2]
🌐 Web query:
testcontainers-go modules version alignment requirements
💡 Result:
- Official
testcontainers-gomodules are separate Go modules (each has its owngo.mod) but are intended to be released/tested together with the main repo. Modules hosted in thetestcontainers-gorepository “will be tested and released with the rest of the modules,” and the module generator scaffoldsgo.modfiles “including the current version of Testcontainers for Go.” [1][2] - Practical alignment rule: when you pin versions, pin the root module and every
modules/*dependency to the same tag (e.g.,v0.40.0). This avoids surprises when APIs change (the release notes regularly include breaking changes affecting specific modules) and matches how the project manages inter-module dependencies during releases. [3] - If you don’t pin versions:
go get github.com/testcontainers/testcontainers-go/modules/<name>will select a module version, and that module’sgo.modwill pull in a compatiblegithub.com/testcontainers/testcontainers-goversion via normal Go dependency resolution (MVS). [2]
Example (explicitly aligned):
go get github.com/testcontainers/testcontainers-go@v0.40.0
go get github.com/testcontainers/testcontainers-go/modules/postgres@v0.40.0
go get github.com/testcontainers/testcontainers-go/modules/kafka@v0.40.0Sources
[1] https://golang.testcontainers.org/modules/
[2] https://golang.testcontainers.org/modules/postgres/
[3] https://github.com/testcontainers/testcontainers-go/releases
🌐 Web query:
testcontainers-go/modules/k3s v0.33.0 v0.35.0 compatibility
💡 Result:
github.com/testcontainers/testcontainers-go/modules/k3s is versioned and released together with testcontainers-go, so you don’t “mix” k3s v0.33.0 with core v0.35.0—upgrading testcontainers-go to v0.35.0 upgrades the k3s module to v0.35.0 as well. [1]
k3s module API compatibility (v0.33.0 → v0.35.0)
- The k3s module entrypoint
k3s.Run(ctx, image, ...)exists in both versions (it’s been available since v0.32.0). So typical k3s usage should remain compatible across v0.33.0 and v0.35.0. [2] - No k3s-specific breaking change is called out in the v0.33.0 or v0.35.0 release notes; the breaking changes listed there are core-library changes. [1]
Core breaking changes you might hit when upgrading to v0.35.0
Even if your k3s code is unchanged, your project may break if you rely on:
- Assigning
container.Terminateto a variable (signature changed to add variadic termination options). Direct calls likecontainer.Terminate(ctx)still work due to variadic args. [1] - Dockerfile build APIs: if you build images via
FromDockerfile,ContextArchivechanged fromio.Readertoio.ReadSeekerin v0.33.0. [1]
Sources: GitHub releases (v0.33.0, v0.35.0) [1], official k3s module docs (Run function since v0.32.0) [2].
Align testcontainers-go modules to the same version as the core library.
When versions are pinned, both the core library and all modules should use the same tag (e.g., both v0.35.0) to align with the project's release and testing practices. Update github.com/testcontainers/testcontainers-go/modules/k3s to v0.35.0 to match the core module version.
🤖 Prompt for AI Agents
In `@tests/go.mod` around lines 18 - 19, Update the test go.mod to pin the
testcontainers k3s module to the same version as the core library: change the
module entry for "github.com/testcontainers/testcontainers-go/modules/k3s" from
v0.33.0 to v0.35.0 so it matches "github.com/testcontainers/testcontainers-go
v0.35.0".
|
Summary:
|
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
|
Summary:
|
| logger.L().Ctx(ctx).Info("pulsar reader closed due to context cancellation") | ||
| return | ||
| } | ||
| if pulsarErr, ok := err.(*pulsar.Error); ok && pulsarErr.Result() == pulsar.ConsumerClosed { |
There was a problem hiding this comment.
@amirmalka can you check if that makes sense?
Summary by CodeRabbit