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

Support for connect native services in topology view. #12098

Merged
merged 2 commits into from
Feb 16, 2022

Conversation

apollo13
Copy link
Contributor

This is a draft implementation for #12096. Misses tests and probably cleanups of the JS code :)

@Amier3 Amier3 linked an issue Jan 18, 2022 that may be closed by this pull request
@Amier3
Copy link
Contributor

Amier3 commented Jan 25, 2022

Hey @apollo13

Thanks for raising this PR! Just letting you know that we didn't skip over this, our front-end eng will be looking over this and giving some guidance on the tests either this week or the next 👍

@johncowen
Copy link
Contributor

Hey @apollo13 👋

Quick note to let you know I'll be picking this up, I'll need a little time to look over the linked issues and get a handle on things so I'll probably be back in a couple o' days or so with questions/queries, just wanted to let you know it's on my radar

ty!

@johncowen johncowen added the theme/ui Anything related to the UI label Feb 3, 2022
@johncowen
Copy link
Contributor

Hey @apollo13 👋

Apologies for the delay in coming back to you here. As most of the changes here are golang related to I've asked somebody on the team to swing by and give this a 👁️ .

From the JS side, as there are very minor changes I'd be happy for this to be merged as is (if the go bits are fine) and we can take it from there, so I'll leave approval up to the go folks.

@@ -3573,8 +3578,8 @@ func (s *Store) ServiceTopology(
if downstream.Service.Kind == structs.ServiceKindConnectProxy {
sn = structs.NewServiceName(downstream.Service.Proxy.DestinationServiceName, &downstream.Service.EnterpriseMeta)
}
if _, ok := tproxyMap[sn]; !ok && downstreamSources[sn.String()] != structs.TopologySourceRegistration {
// If downstream is not a transparent proxy, remove references
if _, ok := tproxyMap[sn]; (!ok && !downstream.Service.Connect.Native) && downstreamSources[sn.String()] != structs.TopologySourceRegistration {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for () around (!ok && !downstream.Service.Connect.Native)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, probably a left-over -- will fix.

Copy link
Contributor

@kisunji kisunji left a comment

Choose a reason for hiding this comment

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

LGTM!

Would you be able to update a test at the handler level here:
https://github.com/hashicorp/consul/blob/main/agent/ui_endpoint_test.go#L998
I think all it needs is an assertion for a mock NodeService with svc.Connect.Native: true

@apollo13 apollo13 marked this pull request as ready for review February 16, 2022 20:56
@apollo13
Copy link
Contributor Author

@kisunji I think I got a test running; I added a new node for it because otherwise those would be a mess…

@apollo13
Copy link
Contributor Author

What I do not know yet: Should I include the static assets (agent/uiserver/bindata_assetfs.go) or not?

@kisunji
Copy link
Contributor

kisunji commented Feb 16, 2022

What I do not know yet: Should I include the static assets (agent/uiserver/bindata_assetfs.go) or not?

Ah you can skip that; we have CI to automatically generate them

Copy link
Contributor

@kisunji kisunji left a comment

Choose a reason for hiding this comment

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

Looks like the test ended up being more of a hassle than I expected, but thank you for being so thorough!

@kisunji
Copy link
Contributor

kisunji commented Feb 16, 2022

Waiting on the team to give a final 👍 before merging

@kisunji kisunji merged commit f01f00f into hashicorp:main Feb 16, 2022
@hc-github-team-consul-core
Copy link
Collaborator

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/586713.

@apollo13
Copy link
Contributor Author

apollo13 commented Feb 18, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-metrics-test theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for connect native in topology view.
5 participants