-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
V2 to v3 fragment #11213
V2 to v3 fragment #11213
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this major cleanup. The main thing I think we should do before shipping is ensuring that the parseFooFromV3Yaml
rejects v2 configs.
/wait
@htuch Thanks for your review comments. I will update code as per your suggestion. Would be helpful if you could provide some code ref for the same. |
@ankatare you want to invoke |
@htuch ok, I will do that. Thanks for Help !!! |
@htuch : please see possible code changes and it's implications. File: test/test_common/utility.h Implications : Almost every test cases under test/.. will be affected due to this change and will be required some rework. Please suggest if it is good to go. . |
@ankatare why did you go with type erasure vs. avoiding boosting in the first place? |
@htuch thanks for your quick comments. |
@ankatare see envoy/source/common/protobuf/utility.h Line 224 in 582eb0e
do_boosting already exists. I think this should be plumbed through to the test wrappers.
|
@htuch Thanks for comments. I will get back as soon as possible |
@htuch Hi, functionality of do_boosting is already implemented in https://github.com/envoyproxy/envoy/blob/master/source/common/protobuf/utility.h#L222. |
@ankatare yes, when you want to force it to parse as v2, you need to set |
@htuch while applying avoid-boosting ( do_boosting = false ) in test code, 2 test cases are failing. (remaining are ok) |
@htuch or suggest from whom to take help. |
@ankatare are you trying to treat these examples as v2 or v3? |
@htuch Thanks for your response. |
@ankatare and you are saying that when you parse them as v3, with |
@htuch yes. |
You might want to run the test with |
@htuch ok. Let me check. Will get back ASAP |
@htuch see debug logs for [ FAILED ] ClusterManagerImplTest.OriginalDstLbRestriction2 (201 ms) |
@htuch following code is executing. i checked with debug output |
@ankatare that is v2 config if it's using ORIGINAL_DST_LB, which was deprecated. Should this be a fragment you hand convert to v3? |
@htuch yeah, while looking at this particular field it seems V2 config and it is deprecated as per doc https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/cluster.proto#envoy-api-enum-cluster-lbpolicy. |
In this case, I think we should allow boosting, as the |
@htuch Thanks a lot for this help. I will update code and get back ASAP. |
Signed-off-by: Abhay Narayan Katare <[email protected]>
Signed-off-by: Abhay Narayan Katare <[email protected]>
@htuch need help to understand this build error , things were fine in my local env. i posted this issue in envoy-ci channel as well. |
@htuch please review changes. i incorporated all of your comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looks like good progress in some places, but I think we need to have:
- Most of the v2 fragments updated to v3 (except for the deprecated feature tests).
- Not set
avoid_boosting
in most place (except for the deprecated features tests).
/wait
@htuch for some of the test cases i need to allow do_boosting (even they are not DEPRECATED) as the EXPECT_THROW is trying to show end-to-end what is expected. So, this is basically parse v2 with explicit boosting. same we discussed above. |
@htuch for this comments i would say yes, it is a default parameter as false for loadFromYamlAndValidate . Since i needed to parse avoid_boosting as 4th parameter in function argument. |
@htuch for this case, to get it pass i just modified function arguments llist as in the another test cases i modified testutil::loadFromYamlAndValidate and it was calling it internally. so i am planning to change name one by one. after code is merged please suggest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. One thing I'm curious about is we see almost no changes to the config; does this mean our config examples are v3 safe for the most part? @adisuissa was this basically what you also observed?
@htuch thanks a lot for all your time on review my code. |
@ankatare no worries; where possible, can you reply using GitHub threads BTW? It's hard to follow conversations with screenshot (although my Slack conversations are fair game for screenshotting ;-) ) |
@htuch really sorry and it is my bad. somehow i am not seeing reply on your individual inputs in my window. it's only a button of "resolve conversation". |
Most configs were either v3 or v2+upgrade safe. |
@htuch @adisuissa : thanks for your review comments, i will get back ASAP. |
Signed-off-by: Abhay Narayan Katare <[email protected]>
109f9f4
to
c3608d2
Compare
@htuch incorporated review comments. thanks for your time to review it. |
@adisuissa incorporated review comments. thanks for your time to review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! As discussed offline, @ankatare will work on some of the test cases I had questions around in the next PR.
Risk Level:Low Testing: integration and format testing Part of envoyproxy#10843 Signed-off-by: Abhay Narayan Katare <[email protected]> Signed-off-by: scheler <[email protected]>
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Commit Message: fragment changes from v2 to v3 API
Additional Description:
Risk Level:Low
Testing: integration and format testing
Docs Changes:
Release Notes:
[Optional Runtime guard:]
[Optional Fixes #10843
[Optional Deprecated:]