Don’t redeploy twice the same manifest in a dev loop#843
Merged
dgageot merged 1 commit intoGoogleContainerTools:masterfrom Jul 25, 2018
Merged
Don’t redeploy twice the same manifest in a dev loop#843dgageot merged 1 commit intoGoogleContainerTools:masterfrom
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
Conversation
0bb50ae to
1c31238
Compare
nkubala
reviewed
Jul 23, 2018
| // Only redeploy modified or new manifests | ||
| // TODO(dgageot): should we delete a manifest that was deployed and is not anymore? | ||
| updated := k.previousDeployment.diff(manifests) | ||
| logrus.Debugln(len(manifests), "manifests to deploy.", len(manifests), "are updated or new") |
Contributor
There was a problem hiding this comment.
nit: add space after deploy.
Contributor
Author
There was a problem hiding this comment.
FYI, Debugln will add a space between values.
|
|
||
| err = kubectl(manifests.reader(), out, k.kubeContext, k.Flags.Global, "apply", k.Flags.Apply, "-f", "-") | ||
| // Only redeploy modified or new manifests | ||
| // TODO(dgageot): should we delete a manifest that was deployed and is not anymore? |
Contributor
There was a problem hiding this comment.
My opinion here would be no, because
- I like the experience of having a deployment recreated by skaffold if I delete it manually (read: accidentally) through kubectl/cloud console, and
- this would mean you could get skaffold into a state where it's not consistent with the configuration in the skaffold.yaml, which is a weird UX
Contributor
Author
There was a problem hiding this comment.
I understand. This PR will not anymore recreate deployments that you accidentally deleted. In exchange, dev cycles are much faster. wdyt?
Contributor
There was a problem hiding this comment.
It's a tradeoff, but I guess if you do something silly like delete a deployment you could always just restart skaffold and have those deployments recreated. I could be convinced that speed is more important here.
3afc4eb to
af58de1
Compare
nkubala
approved these changes
Jul 24, 2018
Contributor
|
Failing test looks like it could be a flake, try retriggering the test run |
Signed-off-by: David Gageot <david@gageot.net>
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.
Signed-off-by: David Gageot david@gageot.net