Fix topology view when displaying mixed connect-native/normal services.#13023
Fix topology view when displaying mixed connect-native/normal services.#13023kisunji merged 3 commits intohashicorp:mainfrom
Conversation
377860f to
94f1d38
Compare
|
Hey @apollo13 Hope you're doing well! Apologies for the delayed review on this, looks like it slipped through the cracks. We'll get this triaged shortly! 😄 |
|
@Amier3 Friendly ping :) any chance of a review? |
|
Hi @apollo13, I don't have the bandwidth to review at this time. If you could describe what the bug is that you are trying to fix (maybe replication steps if it is simple enough) it might help future reviewers understand what behavioral change you are making here. |
|
Ok, here is a reproducer: With the current main branch one will get the following result: with my patch it properly shows the connection as allowed via intentions: |
94f1d38 to
9a55042
Compare
9a55042 to
319f68b
Compare
319f68b to
c53330a
Compare
|
@Amier3 Any chance to get someone to review this? |
c53330a to
4e3320e
Compare
|
I'm interested by seeing this commit validated to fix #14795 |
4e3320e to
bf3f5ff
Compare
|
@kisunji I have rebased the code. Any chance you or someone else could spare the time to review this? |
bf3f5ff to
c564e8c
Compare
4b83eb6 to
c772b45
Compare
c772b45 to
abbea8f
Compare
kisunji
left a comment
There was a problem hiding this comment.
Looks good 👍 Please consider my feedback on the changelog and perhaps test locally to ensure things still look as expected.
If a service is registered twice, once with connect-native and once without, the topology views would prune the existing intentions. This change brings the code more in line with the transparent proxy behavior.
2bbb1a3 to
efa5a6b
Compare
|
Thank you for your help! I have squashed the commits to reduce the noise (the later commits where just small fixes anyways) and will test if it works correctly (aside from the tests) over the weekend. |
| ServiceSummary: ServiceSummary{ | ||
| Name: "cproxy", | ||
| Datacenter: "dc1", | ||
| Tags: []string{"http", "https"}, |
There was a problem hiding this comment.
@kisunji I found a possible bug here. http and it's service-id cproxy-http is not connect enabled. Should this tag show up here then or not? Only cproxy-https with the tag https is connect enabled.
There was a problem hiding this comment.
And I guess Nodes below could get deduped as well like it is done for the tags:
Line 597 in 449e050
There was a problem hiding this comment.
I pushed a commit to dedupe the nodes in this branch as well: bf3865f
There was a problem hiding this comment.
Regarding my first comment in this thread: For transparent proxies it is checked if all instances are in the same "state" (
Lines 586 to 588 in 449e050
There was a problem hiding this comment.
Actually I am leaning towards a service to be considered connect native if any of it's instances are. Connect native is not exactly the same as transparent proxies and allows for even more flexibility (like taking to only a subset of instances of a service which are connect enabled etc…). Will push a commit towards that goal.
There was a problem hiding this comment.
Yep, I agree with your decision. Thanks for being thorough with the changes!
|
I have addressed the issues I ran over and successfully tested the changes in our cluster, jay :) |
1 similar comment
…s. (#13023) * Fix topoloy intention with mixed connect-native/normal services. If a service is registered twice, once with connect-native and once without, the topology views would prune the existing intentions. This change brings the code more in line with the transparent proxy behavior. * Dedupe nodes in the ServiceTopology ui endpoint (like done with tags). * Consider a service connect-native as soon as one instance is.
…l services. (#18330) Fix topology view when displaying mixed connect-native/normal services. (#13023) * Fix topoloy intention with mixed connect-native/normal services. If a service is registered twice, once with connect-native and once without, the topology views would prune the existing intentions. This change brings the code more in line with the transparent proxy behavior. * Dedupe nodes in the ServiceTopology ui endpoint (like done with tags). * Consider a service connect-native as soon as one instance is. Co-authored-by: Florian Apolloner <[email protected]>
|
Thank you for reviewing and merging, much appreciated 👍
…On Mon, Jul 31, 2023, at 14:11, Chris S. Kim wrote:
Merged #13023 <#13023> into main.
—
Reply to this email directly, view it on GitHub
<#13023 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAT5C42ATCE52NUBCRSYRTXS6OFTANCNFSM5VVLSYIQ>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|


Description
If a service is registered twice, once with connect-native and once
without, the topology views would prune the existing intentions. This
change brings the code more in line with the transparent proxy behavior.
PR Checklist