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

Fix remoteManifests #2258

Merged

Conversation

tanner-bruce
Copy link
Contributor

This commit address issue #2160. Remote manifests in the config are
properly pulled again.

This also addresses another unmentioned issue: when using a remote
manifest with skaffold dev, the remote manifest will have its image
updated to include the new tag. When shutting down, the remote manifest
will be left the same, including the updated tag. This causes further
runs of skaffold dev to no longer match the image, and not update it
properly.

This is addressed by saving all of the images in the manifests found the
first time apply is ran, and then on cleanup replacing the images with
those initially found.

@gbird3
Copy link

gbird3 commented Jun 17, 2019

Would love to get this merged in as soon as possible. We want to add skaffold to our development workflow, but due to our current setup this is a requirement before it would make sense to move over.

@balopat balopat added the kokoro:run runs the kokoro jobs on a PR label Jun 19, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jun 19, 2019
@codecov
Copy link

codecov bot commented Jun 19, 2019

Codecov Report

Merging #2258 into master will increase coverage by 0.02%.
The diff coverage is 72.46%.

Impacted Files Coverage Δ
pkg/skaffold/deploy/kubectl/visitor.go 92.85% <ø> (ø) ⬆️
pkg/skaffold/kubectl/cli.go 100% <100%> (ø) ⬆️
pkg/skaffold/deploy/kubectl.go 66.96% <54.54%> (-5.19%) ⬇️
pkg/skaffold/deploy/kubectl/images.go 92.42% <77.77%> (-5.5%) ⬇️

Copy link
Contributor

@nkubala nkubala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tanner-bruce thanks for the PR! can you add some tests for this? ideally for both the deployer change and the image replacer change.

@dgageot
Copy link
Contributor

dgageot commented Jul 5, 2019

@tanner-bruce any chance you could update this PR?

@tanner-bruce tanner-bruce force-pushed the fix-remote-manifests branch 2 times, most recently from 9e6593d to 4b533b4 Compare July 24, 2019 01:31
@tanner-bruce
Copy link
Contributor Author

@dgageot @nkubala I've rebased and added a test for cleaning up remote manifests, i.e reverting to original. I feel like there may be something wrong with it but was having some issues figuring out the testing framework. Let me know and I will make changes as necessary. Thanks!

tanner-bruce and others added 3 commits August 9, 2019 11:42
This commit address issue GoogleContainerTools#2160. Remote manifests in the config are
properly pulled again.

This also addresses another unmentioned issue: when using a remote
manifest with `skaffold dev`, the remote manifest will have its image
updated to include the new tag. When shutting down, the remote manifest
will be left the same, including the updated tag. This causes further
runs of `skaffold dev` to no longer match the image, and not update it
properly.

This is addressed by saving all of the images in the manifests found the
first time apply is ran, and then on cleanup replacing the images with
those initially found.
Adds a test ensuring the proper sequence of commands for reading and
cleaning up remote manifests is executed
@tejal29 tejal29 force-pushed the fix-remote-manifests branch from 4b533b4 to 983a7db Compare August 9, 2019 19:15
@tejal29
Copy link
Contributor

tejal29 commented Aug 9, 2019

@tanner-bruce i added another test case which you missed.
If the CI is green i will merge this in today.
Thanks for your contribution and we apologize for the delay

@tejal29 tejal29 added the kokoro:run runs the kokoro jobs on a PR label Aug 9, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Aug 9, 2019
@tejal29 tejal29 added the kokoro:run runs the kokoro jobs on a PR label Aug 9, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Aug 9, 2019
@tejal29 tejal29 merged commit d81b9cc into GoogleContainerTools:master Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants