Skip to content
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

CNB command-line should only be rewritten if changed #4176

Merged
merged 1 commit into from
May 14, 2020

Conversation

briandealwis
Copy link
Member

Fixes: #4166

Description

In skaffold debug we synthesize an imageConfiguration object for an image containing the environment variables, image labels, command-line, and working directory, as derived from the container image's configuration and the corresponding Kubernetes manifest's container settings.
For buildpacks images, we swizzle the image configuration by resolving the corresponding process definition and replacing the command-line with the process definition, perform the normal debug transforms, and then unswizzle as required for the CNB launching mechanism.

But some of our debug transforms don't actually change the command-line, and so our unswizzling performs a rewrite on a seemingly empty command-line, resulting in a broken command-line.

This change only unswizzles (or rewrites) the container's command-line if it was set. If unset, then we'll use the command-line in the container image's configuration.

@codecov
Copy link

codecov bot commented May 14, 2020

Codecov Report

Merging #4176 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
pkg/skaffold/debug/cnb.go 91.66% <100.00%> (ø)
pkg/skaffold/event/event.go 92.53% <0.00%> (-1.17%) ⬇️
pkg/skaffold/deploy/status_check.go 51.87% <0.00%> (+0.40%) ⬆️

@dgageot dgageot merged commit 650e618 into GoogleContainerTools:master May 14, 2020
@briandealwis briandealwis deleted the cnb-rewrite branch May 16, 2020 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java deployment doesn't stabilize when using skaffold debug and buildpacks
3 participants