Fix and improve sync samples#2131
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2131 +/- ##
=======================================
Coverage 56.33% 56.33%
=======================================
Files 180 180
Lines 7840 7840
=======================================
Hits 4417 4417
Misses 3002 3002
Partials 421 421Continue to review full report at Codecov.
|
41e1926 to
ed693aa
Compare
|
@corneliusweig Could you take a look at those fixes? Thanks! |
| - image: gcr.io/k8s-skaffold/react-reload | ||
| context: app | ||
| sync: | ||
| 'src/components/*': src/components/ |
There was a problem hiding this comment.
oops.. this should not have happened (@.myself). The reason why it could is that react-reload has no test-case in run_test.go.
|
|
||
| COPY package* ./ | ||
| RUN npm install | ||
| COPY src . |
There was a problem hiding this comment.
| COPY src . | |
| COPY src src/ |
Otherwise docker flattens the directory at the destination. And in the package.json the main file is src/index.js. I think it only works by accident, because node looks for index.js in the root folder if the entrypoint is not found.
The other examples are fine, because they use COPY . .
There was a problem hiding this comment.
I think the idea was to flatten the directory. in the skaffold.yaml, sync is configured to strip the src/ prefix.
I'll fix the package.json though.
corneliusweig
left a comment
There was a problem hiding this comment.
Thanks for this examples face-lift. Looks very nice overall. There's one nit and the following bigger issue:
All these examples are not run during integration tests (run_test.go):
examples/compose
examples/helm-deployment-dependencies
examples/hot-reload
examples/jib
examples/jib-multimodule
examples/kustomize
examples/react-reload
At least for react-reload I can say that I simply didn't know that a test-case needed to be added. Should we do that? Could also be another PR, because this one is already quite large.
Signed-off-by: David Gageot <david@gageot.net>
The sample currently doesn’t work Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
|
Good point. I'll push a PR to test more samples (not sure it's easy to test them all) after this PR is merged. |
Signed-off-by: David Gageot <david@gageot.net>
|
@dgageot LGTM |
syncconfiguration onhot-reloadsampleskaffold.yamlfiles with regards to deploy config.