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

Make the hot-reload example more exemplary #1680

Merged
merged 1 commit into from Feb 21, 2019

Conversation

jonaseck2
Copy link
Contributor

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

Signed-off-by: Jonas Eckerström <jonaseck@gmail.com>
@googlebot
Copy link

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. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

Googlers can find more info about SignCLA and this PR by following this link.

@jonaseck2
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

Googlers can find more info about SignCLA and this PR by following this link.

@dgageot
Copy link
Contributor

dgageot commented Feb 21, 2019

CI is green despite the status reported on GitHub.

@dgageot dgageot merged commit c5efc72 into GoogleContainerTools:master Feb 21, 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.

None yet

3 participants