-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
What kind of request is this?
Improvement of existing experience
What is your request or suggestion?
When authentication to a container registry fails during patching operations, Copacetic produces a confusing "panic: send on closed channel" error instead of surfacing the underlying authentication error. The actual authentication error is only visible when debug logging is enabled.
Expected Behavior
Authentication failures should produce clear, actionable error messages that help users understand and resolve the issue, such as:
- "Authentication failed: invalid credentials for registry docker.io"
- "Registry authentication required but no credentials provided"
- "Failed to authenticate to registry: [specific error details]"
Actual Behavior
Authentication failures result in a runtime panic with a confusing stack trace that doesn't indicate the root cause:
panic: send on closed channel
goroutine 320 [running]:
github.com/project-copacetic/copacetic/pkg/patch.ExecutePatchCore(0x0?, 0xc0008cdb80)
/home/runner/work/copacetic/copacetic/pkg/patch/core.go:104 +0x813
github.com/project-copacetic/copacetic/pkg/patch.executePatchBuild.func1({0x135e8f0?, 0xc00003caf0?}, {0x1364a30?, 0xc0007b5d80?})
/home/runner/work/copacetic/copacetic/pkg/patch/single.go:418 +0x128
Steps to Reproduce
- Attempt to patch a container image that requires authentication
- Use invalid credentials or no credentials
- Observe the panic instead of a clear authentication error
- Enable debug logging to see the actual authentication failure
Are you willing to submit PRs to contribute to this feature request?
- Yes, I am willing to implement it.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
🏗 In progress