-
-
Notifications
You must be signed in to change notification settings - Fork 586
fix(solace): set ulimits for container #3497
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. |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughThe changes upgrade the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Run
participant HostConfig
participant Container
Caller->>Run: Run(ctx, opts...)
activate Run
Note over Run: Create container settings
loop opts iteration
Run->>Run: Apply Option to settings
end
Run->>HostConfig: Set Ulimits
activate HostConfig
HostConfig->>HostConfig: nofile = 1048576
HostConfig->>HostConfig: core = -1
HostConfig->>HostConfig: memlock = -1
deactivate HostConfig
Run->>Container: Create with HostConfig
activate Container
Container-->>Run: Success
deactivate Container
Run-->>Caller: Container ready
deactivate Run
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
modules/solace/solace.go (1)
12-18: Ulimits configuration via units.Ulimit matches Docker API usageImporting
github.com/docker/go-unitsand assigninghc.Ulimits = []*units.Ulimit{...}is idiomatic for Docker’sHostConfig.Ulimits, and the chosen values (nofile=1048576,core=-1,memlock=-1) align with what Solace brokers typically require. One optional consideration: this assignment replaces any existinghc.Ulimits; if you ever expect callers or other customizers to preconfigure ulimits, you might instead append or consciously document that Solace settings are authoritative.Also applies to: 66-88
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
modules/solace/go.mod(1 hunks)modules/solace/solace.go(3 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-09-18T08:24:27.479Z
Learnt from: mdelapenya
Repo: testcontainers/testcontainers-go PR: 3254
File: .github/dependabot.yml:21-21
Timestamp: 2025-09-18T08:24:27.479Z
Learning: In the testcontainers-go repository, submodules like atlaslocal that are part of a parent module (e.g., mongodb) share the same go.mod file and should not have separate Dependabot entries. They are already monitored through the parent module's Dependabot configuration entry.
Applied to files:
modules/solace/go.mod
📚 Learning: 2025-09-29T13:57:14.636Z
Learnt from: mdelapenya
Repo: testcontainers/testcontainers-go PR: 3319
File: modules/arangodb/arangodb.go:46-57
Timestamp: 2025-09-29T13:57:14.636Z
Learning: In testcontainers-go ArangoDB module, the wait strategy combines port listening check with HTTP readiness check using wait.ForAll - both strategies are required and complementary, not redundant.
Applied to files:
modules/solace/go.modmodules/solace/solace.go
📚 Learning: 2025-09-29T15:08:18.694Z
Learnt from: mdelapenya
Repo: testcontainers/testcontainers-go PR: 3320
File: modules/artemis/artemis.go:98-103
Timestamp: 2025-09-29T15:08:18.694Z
Learning: In testcontainers-go, nat.Port is a type alias for string, so untyped string constants can be passed directly to functions expecting nat.Port (like wait.ForListeningPort) without explicit type conversion - the Go compiler handles the implicit conversion automatically.
Applied to files:
modules/solace/solace.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: test (1.24.x, modules/solace) / test: modules/solace/1.24.x
- GitHub Check: test (1.25.x, modules/solace) / test: modules/solace/1.25.x
- GitHub Check: Analyze (go)
🔇 Additional comments (2)
modules/solace/go.mod (1)
7-14: Direct go-units dependency correctly reflects new importPromoting
github.com/docker/go-units v0.5.0to a direct requirement matches the new usage insolace.goand avoids depending on it transitively; this looks correct as-is.modules/solace/solace.go (1)
29-38: Run documentation clearly surfaces Solace ulimit requirementsThe expanded comment on
Runis clear and helpful, explicitly calling out the required ulimits and linking to the Solace docs. It accurately reflects what the module now enforces viaHostConfig.Ulimits.
What does this PR do?
It sets the ulimits described in the Solace docs:
Why is it important?
The Solace tests are failing on CI, because of the specs of the GH runner (the tests pass on my local machine).