chore: Rename runtime label and add buildkit and stale labels#1703
Conversation
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughUpdated GitHub issue/PR labels (removed "podman", added "container runtime", "buildkit", and "stale") and simplified Logging.ExecuteCommandInDockerContainer to always join the command into a single string and forward it to the core logging method. ChangesRepository labels configuration
Logging wrapper change
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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: 1
🤖 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 @.github/settings.yml:
- Around line 91-93: The renamed label "container runtime" currently drops the
old "podman" tag; restore compatibility by preserving "podman" as an alias or
secondary name for the label: update the label definition for "container
runtime" to include the legacy alias (e.g., add an aliases: ["podman"] entry or
equivalent in the label metadata) so existing issues/PRs, saved searches, and
automations still matching "podman" continue to work.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
c0da98e to
141c368
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/Testcontainers/Logging.cs (1)
206-210: ⚡ Quick winRestore the
IsEnabledcheck to avoid unnecessary allocations when logging is disabled.The removal of the
IsEnabled(LogLevel.Information)guard meansstring.Join(" ", command)now executes unconditionally, even when Information logging is disabled. This creates unnecessary string allocations in production scenarios where this log level is typically off. SinceDockerContainerOperations.ExecAsynccalls this wrapper for every container exec operation, the impact could be significant on hot paths.Line 264 demonstrates the established pattern of guarding expensive operations with
IsEnabledchecks.⚡ Proposed fix to restore the guard
public static void ExecuteCommandInDockerContainer(this ILogger logger, string id, IEnumerable<string> command) { + if (!logger.IsEnabled(LogLevel.Information)) + { + return; + } + var commandLine = string.Join(" ", command); ExecuteCommandInDockerContainerCore(logger, commandLine, new TruncatedId(id)); }🤖 Prompt for 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. In `@src/Testcontainers/Logging.cs` around lines 206 - 210, Restore the logging guard in ExecuteCommandInDockerContainer to avoid allocating the joined command string when Information logging is disabled: wrap the string.Join(" ", command) and the call to ExecuteCommandInDockerContainerCore in an if (logger.IsEnabled(LogLevel.Information)) { ... } block (using the same pattern as seen at other sites), so only when logger.IsEnabled(LogLevel.Information) is true you construct commandLine and call ExecuteCommandInDockerContainerCore(logger, commandLine, new TruncatedId(id)); leave TruncatedId and ExecuteCommandInDockerContainerCore unchanged.
🤖 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.
Nitpick comments:
In `@src/Testcontainers/Logging.cs`:
- Around line 206-210: Restore the logging guard in
ExecuteCommandInDockerContainer to avoid allocating the joined command string
when Information logging is disabled: wrap the string.Join(" ", command) and the
call to ExecuteCommandInDockerContainerCore in an if
(logger.IsEnabled(LogLevel.Information)) { ... } block (using the same pattern
as seen at other sites), so only when logger.IsEnabled(LogLevel.Information) is
true you construct commandLine and call
ExecuteCommandInDockerContainerCore(logger, commandLine, new TruncatedId(id));
leave TruncatedId and ExecuteCommandInDockerContainerCore unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 850eaa3f-bbf9-46e6-bd9d-98b1ddd6209a
📒 Files selected for processing (2)
.github/settings.ymlsrc/Testcontainers/Logging.cs
✅ Files skipped from review due to trivial changes (1)
- .github/settings.yml
What does this PR do?
-
Why is it important?
-
Related issues
-
Summary by CodeRabbit