Make the hot-reload example more exemplary#1680
Merged
dgageot merged 1 commit intoGoogleContainerTools:masterfrom Feb 21, 2019
Merged
Make the hot-reload example more exemplary#1680dgageot merged 1 commit intoGoogleContainerTools:masterfrom
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
Conversation
Signed-off-by: Jonas Eckerström <jonaseck@gmail.com>
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
Googlers can find more info about SignCLA and this PR by following this link. |
Contributor
Author
|
I signed it! |
|
CLAs look good, thanks! Googlers can find more info about SignCLA and this PR by following this link. |
dgageot
approved these changes
Feb 21, 2019
Contributor
|
CI is green despite the status reported on GitHub. |
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.
While investigating #1668 I found myself modifying the hot-reload example to actually test how sync works in 0.22, and doesn't in 0.23/master. The example is a little too succinct to understand how hot-reload works:
First off the example syncs exactly one source file. The Dockerfile does copy a glob, but the destination isn't a folder, so adding a second source file sibling crashes the build.
Secondly I was suspecting that nested folders might be the issue, so i added a src folder, which is probably closer to a real world example anyways. It also clarifies that the pattern isn't recursive like .gitignore (unless the folder name matches, then it's actually traversed), even though the k8s path does hint at that.
Now when the Dockerfile and sync pattern no longer exactly overlap, you can easily test that only files intersected by the Dockerfile and sync pattern are synced, files included by the Dockerfile but not the sync pattern fall back to docker build, and files matched by the pattern but outside the Dockerfile are ignored.
In hindsight it feels kinda obvious, but we'll probably end up with fewer issues on hot-reload with an example that is a little more verbose.
My comment on #1668 is probably a separate issue
/jonas
Signed-off-by: Jonas Eckerström jonaseck@gmail.com