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

Enable proto schema for router_check_tool #6992

Merged
merged 23 commits into from
May 22, 2019
Merged

Conversation

jyotima
Copy link
Contributor

@jyotima jyotima commented May 17, 2019

Description: Enable proto schema in router check tool to prepare future deprecation of json schema.
Risk Level: Low. Adds a new code path for router check tool.
Testing:

  • Verified that the existing router check tool path is not manipulated at all.
  • New code path can only be invoked using the --useproto flag, which is false by default.
  • Ran the router tests on Lyft tests.
    Docs Changes:
    Release Notes:

@jyotima jyotima changed the title Fork Enable proto schema for router_check_tool May 17, 2019
@mattklein123 mattklein123 self-assigned this May 17, 2019
@mattklein123
Copy link
Member

Thanks for working on this @jyotima this will be great to have. I will take a pass in a couple of days, but in the interim can you work on fixing DCO, fixing format, and adding tests for the new code? Thank you!

/wait

@mattklein123
Copy link
Member

Oh also this new feature will need version history notes and documentation here: https://www.envoyproxy.io/docs/envoy/latest/install/tools/route_table_check_tool. Thank you!

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.

Thank you. Looking good. Flushing out some comments. We still need some tests for the new code here https://github.com/envoyproxy/envoy/tree/master/test/tools/router_check/test. @hennna can you potentially also take a look at this change?

/wait

docs/root/intro/version_history.rst Outdated Show resolved Hide resolved
docs/root/install/tools/route_table_check_tool.rst Outdated Show resolved Hide resolved
docs/root/install/tools/route_table_check_tool.rst Outdated Show resolved Hide resolved
test/tools/router_check/validation.proto Show resolved Hide resolved
test/tools/router_check/validation.proto Outdated Show resolved Hide resolved
test/tools/router_check/validation.proto Outdated Show resolved Hide resolved
test/tools/router_check/router_check.cc Outdated Show resolved Hide resolved
test/tools/router_check/router_check.cc Outdated Show resolved Hide resolved
test/tools/router_check/router_check.cc Outdated Show resolved Hide resolved
test/tools/router_check/router.cc Outdated Show resolved Hide resolved
docs/root/install/tools/route_table_check_tool.rst Outdated Show resolved Hide resolved
Jyoti Mahapatra added 8 commits May 20, 2019 14:11
router

router

Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
@jyotima
Copy link
Contributor Author

jyotima commented May 20, 2019

Thank you. Looking good. Flushing out some comments. We still need some tests for the new code here https://github.com/envoyproxy/envoy/tree/master/test/tools/router_check/test. @hennna can you potentially also take a look at this change?

/wait

@mattklein123 I have modified route_tests.sh to make sure it exercises the new code path. Essentially, the tests are the same, but use a different schema based on the proto.

Jyoti Mahapatra added 2 commits May 20, 2019 15:09
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
@mattklein123
Copy link
Member

@jyotima will take a look. Friendly request to not force push new commits in the future. It makes your change much more difficult to review. Thanks!

@mattklein123
Copy link
Member

Is there a way to avoid this?

You might consider setting up the support hooks or finding some other workflow that you like: https://github.com/envoyproxy/envoy/tree/master/support

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.

Thanks looks good. Few small comments and we can ship!

/wait

docs/root/install/tools/route_table_check_tool.rst Outdated Show resolved Hide resolved
docs/root/install/tools/route_table_check_tool.rst Outdated Show resolved Hide resolved
docs/root/intro/version_history.rst Outdated Show resolved Hide resolved
test/tools/router_check/validation.proto Outdated Show resolved Hide resolved
test/tools/router_check/validation.proto Outdated Show resolved Hide resolved
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
@jyotima
Copy link
Contributor Author

jyotima commented May 21, 2019

@mattklein123
took care of all the comments now.

hennna
hennna previously approved these changes May 21, 2019
pb
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
pb
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
hennna
hennna previously approved these changes May 21, 2019
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.

LGTM, thanks for the great work! One small question.

/wait

@@ -46,7 +46,7 @@ message ValidationInput {

// This pseudo-header field includes the HTTP method.
// The options are GET, PUT, or POST. When not specified the field defaults to GET.
string method = 4 [(validate.rules).string = {in: ["GET", "POST", "PUT", ""]}];
Copy link
Member

Choose a reason for hiding this comment

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

I think method should still be required? WDYT?

Copy link
Contributor

@jyotimahapatra jyotimahapatra May 22, 2019

Choose a reason for hiding this comment

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

@mattklein123 Based on existing documentation method is optional

:method
(optional, string) The request method. If not specified, the default method is GET. The options are GET, PUT, or POST.

We can make this a breaking change too if it brings more clarity in usage. I think defaulting to GET makes sense.

Copy link
Member

Choose a reason for hiding this comment

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

IMO I would make it required. I think the tests should be very specific so they are easy to visually understand.

Copy link
Contributor

Choose a reason for hiding this comment

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

agree with the part about making it very explicit for consistency. I will make the change right away.

Copy link
Contributor

@jyotimahapatra jyotimahapatra May 22, 2019

Choose a reason for hiding this comment

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

@mattklein123 I made the change to make method mandatory. I have put min_bytes=3 . I didn't want to put the exhaustive method list there, but all methods have a length of 3. Is it a good constraint to have?

Jyoti Mahapatra added 2 commits May 21, 2019 20:34
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
@jyotimahapatra
Copy link
Contributor

@mattklein123 We are hitting Code coverage 97.4 is lower than limit of 97.5 in the coverage CI task. How should we handle that?

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.

Thanks! Coverage is broken in master. Since you didn't add to the problem I will force merge this. Great work!

@jyotimahapatra
Copy link
Contributor

@mattklein123 Thank you so much!!!

@mattklein123 mattklein123 merged commit cab4ce6 into envoyproxy:master May 22, 2019
@jyotima jyotima deleted the fork branch May 22, 2019 05:58
@jyotima jyotima restored the fork branch May 22, 2019 05:59
@jyotima jyotima deleted the fork branch May 22, 2019 05:59
mpuncel added a commit to mpuncel/envoy that referenced this pull request May 22, 2019
* master: (65 commits)
  proto: Add PATCH method to RequestMethod enum (envoyproxy#6737)
  exe: drop unused deps on zlib compressor code (envoyproxy#7022)
  coverage: fix some misc coverage (envoyproxy#7033)
  Enable proto schema for router_check_tool (envoyproxy#6992)
  stats: rework stat sink flushing to centralize counter latching (envoyproxy#6996)
  [test] convert lds api test config stubs to v2 (envoyproxy#7021)
  router: scoped rds (2c): implement scoped rds API (envoyproxy#6932)
  build: Add option for size-optimized binary (envoyproxy#6960)
  test: adding an integration test framework for file-based LDS (envoyproxy#6933)
  doc: update obsolete ref to api/XDS_PROTOCOL.md (envoyproxy#7002)
  dispatcher: faster runOnAllThreads (envoyproxy#7011)
  example: add csrf sandbox (envoyproxy#6805)
  fix syntax of gcov exclusion zone. (envoyproxy#7023)
  /runtime_modify: add support for query params in body (envoyproxy#6977)
  stats: Create stats for http codes with the symbol table. (envoyproxy#6733)
  health check: fix more fallout from inline deletion change (envoyproxy#6988)
  Max heap fix (envoyproxy#7016)
  Add support to unregister from lifecycle notifications (envoyproxy#6984)
  build spdy_core_alt_svc_wire_format (envoyproxy#7010)
  ext_authz: Make sure initiateCall only called once (envoyproxy#6949)
  ...

Signed-off-by: Michael Puncel <mpuncel@squareup.com>
@jyotimahapatra
Copy link
Contributor

#730

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.

4 participants