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

examples: Fix deprecations/warnings in configs #13503

Merged

Conversation

phlax
Copy link
Member

@phlax phlax commented Oct 12, 2020

Signed-off-by: Ryan Northey ryan@synca.io

Commit Message: examples: Fix deprecations/warnings in configs
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
[Optional Runtime guard:]
[Optional Fixes #Issue] Fix #13467
[Optional Deprecated:]

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>
@mattklein123 mattklein123 self-assigned this Oct 12, 2020
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thanks. cc @htuch it would be good to understand why this wasn't failing by default in config checking.

@phlax
Copy link
Member Author

phlax commented Oct 12, 2020

@mattklein123 there are some further warnings left, im happy to land this and address after (if tests pass) - or i can go through the remaining ones

@mattklein123
Copy link
Member

We can just land this. I would still like to understand why we are not failing on these warnings in the config test, but we can look into that separately.

@mattklein123 mattklein123 merged commit 1dd8c12 into envoyproxy:master Oct 12, 2020
@moderation
Copy link
Contributor

There are still dangling references to v2 in the examples. These should be bumped to v3.

examples/zipkin-tracing/service2-envoy-zipkin.yaml
17:                "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
19:                collector_endpoint: "/api/v2/spans"

examples/zipkin-tracing/front-envoy-zipkin.yaml
18:                "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
20:                collector_endpoint: "/api/v2/spans"

examples/jaeger-native-tracing/front-envoy-jaeger.yaml
18:                "@type": type.googleapis.com/envoy.config.trace.v2.DynamicOtConfig

examples/jaeger-native-tracing/service2-envoy-jaeger.yaml
17:                "@type": type.googleapis.com/envoy.config.trace.v2.DynamicOtConfig

examples/zipkin-tracing/service1-envoy-zipkin.yaml
17:                "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
19:                collector_endpoint: "/api/v2/spans"
53:                "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
55:                collector_endpoint: "/api/v2/spans"

examples/jaeger-native-tracing/service1-envoy-jaeger.yaml
45:                "@type": type.googleapis.com/envoy.config.trace.v2.DynamicOtConfig

examples/mysql/envoy.yaml
16:          "@type": type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy

examples/redis/envoy.yaml
12:          "@type": type.googleapis.com/envoy.config.filter.network.redis_proxy.v2.RedisProxy

examples/jaeger-tracing/service2-envoy-jaeger.yaml
17:                "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
19:                collector_endpoint: "/api/v2/spans"

examples/jaeger-tracing/front-envoy-jaeger.yaml
18:                "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
20:                collector_endpoint: "/api/v2/spans"

examples/jaeger-tracing/service1-envoy-jaeger.yaml
17:                "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
19:                collector_endpoint: "/api/v2/spans"
54:                "@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
56:                collector_endpoint: "/api/v2/spans"

examples/fault-injection/envoy.yaml
33:              "@type": type.googleapis.com/envoy.config.filter.http.fault.v2.HTTPFault

@phlax
Copy link
Member Author

phlax commented Oct 12, 2020

@moderation cool, ill update...

@mattklein123
Copy link
Member

(Would still like to figure out why this is not failing by default)

@htuch
Copy link
Member

htuch commented Oct 13, 2020

@mattklein123 are you asking:

  1. Why aren't we failing in config examples when there is any warning?
  2. Why aren't we rejecting v2 configs by default?
    For (2), this is on my TODO for the next week. For (1) I don't think we have support but it might make sense to add.

@phlax
Copy link
Member Author

phlax commented Oct 13, 2020

see #13542

@mattklein123
Copy link
Member

I'm fairly sure that (1) has been implemented already for using deprecated fields. I know @alyssawilk fixed this to fail by default at some point, but I'm guessing it's somehow not working for the typed_config warnings for v2 types.

For (2) I'm just suggesting that if we are using a deprecated typed_config we should fail the config_test by default like we do for other deprecated config.

@mattklein123
Copy link
Member

@htuch see

// Here we setup runtime to mimic the actual deprecated feature list used in the
// production code. Note that this test is actually more strict than production because
// in production runtime is not setup until after the bootstrap config is loaded. This seems
// better for configuration tests.
ScopedRuntimeInjector scoped_runtime(server_.runtime());
ON_CALL(server_.runtime_loader_.snapshot_, deprecatedFeatureEnabled(_, _))
.WillByDefault(Invoke([](absl::string_view, bool default_value) { return default_value; }));
ON_CALL(server_.runtime_loader_, threadsafeSnapshot()).WillByDefault(Invoke([this]() {
return snapshot_;
}));

@phlax
Copy link
Member Author

phlax commented Oct 13, 2020

@mattklein123 @htuch please can we move to the ticket - rather than a landed PR, thanks

@htuch
Copy link
Member

htuch commented Oct 13, 2020

I'll take care of this when I work on (2).

antoniovicente pushed a commit to antoniovicente/envoy that referenced this pull request Nov 20, 2020
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: phlax <phlax@users.noreply.github.com>
Signed-off-by: Antonio Vicente <avd@google.com>
cpakulski pushed a commit to cpakulski/envoy that referenced this pull request Nov 20, 2020
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>

Signed-off-by: phlax <phlax@users.noreply.github.com>
cpakulski pushed a commit to cpakulski/envoy that referenced this pull request Nov 20, 2020
Signed-off-by: Ryan Northey <ryan@synca.io>

Signed-off-by: phlax <phlax@users.noreply.github.com>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
antoniovicente pushed a commit that referenced this pull request Nov 20, 2020
Backport of PR #13529 and #13503

Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>

Co-authored-by: phlax <phlax@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

front-proxy example emits configuration warning on startup
4 participants