Skip to content

Move RPC router from Client/Server and into BaseDeps #8559

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

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

mkeeler
Copy link
Member

@mkeeler mkeeler commented Aug 25, 2020

This will allow it to be a shared component which is needed for AutoConfig

@mkeeler mkeeler requested review from dnephin and a team August 25, 2020 16:28
Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

Nice! This looks great. I'm not that familiar with agent/router, but I think this all made sense to me. A few minor suggestions.

@dnephin
Copy link
Contributor

dnephin commented Aug 25, 2020

The test failures reproduce locally. I think the test assumptions need to change now that there are multiple coordinates? Or does Coordinate.ListDatacenters need to change?

@mkeeler mkeeler force-pushed the feature/base-deps-router branch 2 times, most recently from 2ed882c to 4d38042 Compare August 26, 2020 13:35
@mkeeler
Copy link
Member Author

mkeeler commented Aug 26, 2020

@dnephin Our public docs say those APIs are supposed to be only for WAN.

This endpoint returns the WAN network coordinates for all Consul servers, organized by datacenters.

So I probably should filter out the LAN Area servers from the GetDatacenterMaps in the router.

@dnephin
Copy link
Contributor

dnephin commented Aug 26, 2020

Ah, makes sense! If it's a concern of the API, maybe filter it out in the api/rpc endpoints instead of GetDatacenterMaps ?

@mkeeler mkeeler force-pushed the feature/base-deps-router branch 2 times, most recently from e8d7b62 to 37e016e Compare August 26, 2020 16:22
Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

Nice! This is great.

I would have expected the filtering for LAN to happen in the api/rpc handler, but I don't know this code very well, so maybe that expectation is wrong. One suggestion for the comment to make it more visible, but not a blocker.

This will allow it to be a shared component which is needed for AutoConfig
@mkeeler mkeeler force-pushed the feature/base-deps-router branch from 37e016e to cc37b46 Compare August 26, 2020 16:43
@mkeeler
Copy link
Member Author

mkeeler commented Aug 26, 2020

@dnephin is there any reason why the BaseDeps changes were not backported?

@dnephin
Copy link
Contributor

dnephin commented Aug 26, 2020

Not really. I think it would be ok to backport them. I generally wait to backport larger refactor changes to reduce the risk of regressions in patch releases. I see this is tagged for backport so I can prepare a PR to backport all the necessary changes to avoid conflicts when this one is merged.

@dnephin
Copy link
Contributor

dnephin commented Aug 26, 2020

Merging #8573 should allow this PR to be automatically backported. I tried it out locally and it merged clean.

@mkeeler mkeeler merged commit f97cc04 into master Aug 27, 2020
@mkeeler mkeeler deleted the feature/base-deps-router branch August 27, 2020 15:23
@hashicorp-ci
Copy link
Contributor

🍒✅ Cherry pick of commit f97cc04 onto release/1.8.x succeeded!

hashicorp-ci pushed a commit that referenced this pull request Aug 27, 2020
This will allow it to be a shared component which is needed for AutoConfig
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.

3 participants