Copy configs into example images#12256
Conversation
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
|
@dio yep im just cleaning up the code now, but i think its a good idea. The only reservation is that its a 10 minutes test run, so not sure if we want it to trigger on every change - perhaps only if docs or examples change |
|
@dio we used to run ci/verify_examples.sh so if we can bring that back it would be great. |
dio
left a comment
There was a problem hiding this comment.
Thanks. Let's plan for running the examples-verification in subsequent PR.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
and copy configs into example image Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
|
@dio i fixed the |
dio
left a comment
There was a problem hiding this comment.
Wait, sorry, missed the jaeger case.
Signed-off-by: Ryan Northey <ryan@synca.io>
|
@dio PR updated with latest test can be seen here: https://travis-ci.org/github/phlax/envoy-examples/builds/712510401 |
mattklein123
left a comment
There was a problem hiding this comment.
Thanks so much for making our examples better. One comment. Thank you!
/wait
| layered_runtime: | ||
| layers: | ||
| - name: static_layer | ||
| static_layer: | ||
| envoy.deprecated_features:envoy.api.v2.route.CorsPolicy.allow_origin: true | ||
| envoy.deprecated_features:envoy.api.v2.route.Route.per_filter_config: true | ||
| envoy.deprecated_features:envoy.api.v2.route.VirtualHost.per_filter_config: true | ||
| envoy.deprecated_features:envoy.type.matcher.StringMatcher.regex: true |
There was a problem hiding this comment.
I think these configs are missing from https://github.com/envoyproxy/envoy/blob/master/examples/BUILD. Can we fix the configs? This will have to be updated also https://github.com/envoyproxy/envoy/blob/master/test/config_test/example_configs_test.cc.
Bonus points for figuring out how to automatically make sure new configs get added for testing. This is a consistent problem that we have. Thank you!
There was a problem hiding this comment.
@mattklein123 i found the problem using this test runner
https://github.com/phlax/envoy-examples
weve been talking about how/if we could land it in envoy repo - i was waiting to land this first before thinking about it
There was a problem hiding this comment.
OK sounds good. In the interim can you fix the configs and add to the config tests? Thank you.
There was a problem hiding this comment.
not sure if it would catch these configs tho
There was a problem hiding this comment.
I think these configs are missing from https://github.com/envoyproxy/envoy/blob/master/examples/BUILD. Can we fix the configs?
I updated the BUILD script with all of the configs with yaml suffix.
Not entirely clear if this is correct, but also noticing that there is at least one non-yaml config listed, so there may be more
This will have to be updated also https://github.com/envoyproxy/envoy/blob/master/test/config_test/example_configs_test.cc.
Im afraid its not immediately obvious to me what needs to change here
There was a problem hiding this comment.
You need to:
- Add the missing configs to the build config
- Fix the configs
- Update the test to account for the new number of configs (you will see the test will fail).
Thank you!
There was a problem hiding this comment.
i have fixed the deprecation issues in the example configs and updated the necessary test files
I wasnt able to include the jaeger-native config as it fails with
2020-08-01T17:22:05.6865108Z test/config_test/config_test.cc:134: Failure
2020-08-01T17:22:05.6865445Z Failed
2020-08-01T17:22:05.6866695Z '/b/f/w/_tmp/163cb06a4250265abc95a57e525238d7/test/config_test/jaeger-native-tracing_service1-envoy-jaeger.yaml' config failed. Error: opentracing: failed to load dynamic library: /usr/local/lib/libjaegertracing_plugin.so: cannot open shared object file: No such file or directory
im not sure how to mock/expect the files absence. Im happy to update if i know how.
i also updated the test runner i have tor the examples to test both the cors and csrf examples more thoroughly, and ensure i wasnt breaking anything.
regarding keeping the BUILD script up-to-date, we could do something like
cd examples
configs="$(find . -name "*.yaml" -o -name "*.lua" | grep -v docker-compose | cut -d/ -f2-)"
for config in $configs; do
grep "\"$config\"" BUILD || exit 1
done
it would fail on this PR because the jaeger configs arent included
There was a problem hiding this comment.
Awesome thanks a ton. Agreed we can do something like the script you recommend as a follow up? (Perhaps with an exclusion list for configs we know won't work.)
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
- erroneously added compose config removed - jaeger native configs removed - these configs fail the tests because of missing binary Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io> Signed-off-by: chaoqinli <chaoqinli@google.com>
This PR incorporates the tests that i created for the envoy examples (originally here: https://github.com/phlax/envoy-examples) It also adds a test to ensure that example configs have been added to the examples `BUILD` config (ref: #12256 (comment)) Signed-off-by: Ryan Northey <ryan@synca.io>
Commit Message:
Copy configs into example docker images and fix remaining permission issues
Additional Description:
Since the
envoydocker image no longer runs asroot, a strictumasksetting in a development environment can prevent the examples from working.There were also some remaining permissions issues in the examples that are dealt with here.
There are some docs that are out of date or that can/should be updated - i will update these shortly
There is a test runner that I built for tracking down and testing the documented commands. It can be seen here:
https://github.com/phlax/envoy-examples
And the output from a successful test run using this
PRcan be seen here:https://travis-ci.org/github/phlax/envoy-examples/builds/711188378
The
grpc-bridgeexample didnt work at all - so i separated that to a different issue #12231Edit: the
jaeger-native-tracingexample segfaults - but not as a result of this PR` see #12287Update: binary for
jaeger-native-tracingis included and the example worksUpdate: fixes for the
grpc-bridgeexample are now included, but i'll leave docs updates to a separate PRRisk Level: low
Testing: see above
Docs Changes: tba
Release Notes: n/a
[Optional Runtime guard:]
[Optional Fixes #Issue] Touch #12112 Fixes #12287
[Optional Deprecated:]