Conversation
…g them The cleanup returned by dockerRenderEngine.Setup discarded the error from removeRenderNetwork, so a failed removal (typically a leaked container still attached to the network) leaked the crossplane-render-* network silently. Log the failure through the engine's logger with the network name and ID, and bound removal with a timeout instead of an unbounded context.Background(). The cleanup's func() signature and the Engine interface are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
dockerRenderEngine.Setupreturned a cleanup that did_ = removeRenderNetwork(context.Background(), networkID), so a failed removal (typically a leaked container still attached to the network, see #396/#397) leaked thecrossplane-render-*network silently.This PR:
Info, matchingStopFunctionRuntimes), with the network name, ID and error. It is visible with--verbose. Making it visible without--verboseis tracked separately in render: Function cleanup failures are invisible without --verbose #399.context.Background().The
Engineinterface and the cleanup'sfunc()type are unchanged because external tools implement and consume them. Returning the error to callers would need an interface change, so I've left that for discussion.Tests: no unit test added.
removeRenderNetworkcallsdocker.NewClient()directly, so the package has no seam for it, and testing this path would need a real Docker daemon. I didn't want to add a mocking layer just for this fix. Existing tests pass.Fixes #398
I have:
Run(nix isn't installed here, so I ran./nix.sh flake checkto ensure this PR is ready for review.go build ./...,go test ./cmd/crossplane/render/...andgolangci-lint run ./cmd/crossplane/render/...instead; all pass with 0 lint issues)Added or updated unit tests.(no seam for network removal without a real Docker daemon; see above)Linked a PR or a docs tracking issue to document this change.Addedbackport release-x.ylabels to auto-backport this PR.Need help with this checklist? See the cheat sheet.
🤖 Generated with Claude Code