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

[xds] Fallback implementation #36145

Closed
wants to merge 36 commits into from
Closed

Conversation

eugeneo
Copy link
Contributor

@eugeneo eugeneo commented Mar 18, 2024

As per gRFC A71.

@eugeneo eugeneo added the release notes: no Indicates if PR should not be in release notes label Mar 18, 2024
@eugeneo eugeneo requested a review from markdroth March 18, 2024 22:02
Copy link
Member

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

This looks like a good start! Haven't had a chance to review the tests yet but wanted to send you my comments on the code.

Please let me know if you have any questions. Thanks!

src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.h Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
Copy link
Member

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

Here are my comments on the tests.

Please let me know if you have any questions. Thanks!

test/cpp/end2end/xds/xds_server.h Outdated Show resolved Hide resolved
test/cpp/end2end/xds/xds_server.h Outdated Show resolved Hide resolved
test/cpp/end2end/xds/xds_server.h Outdated Show resolved Hide resolved
test/cpp/end2end/xds/xds_end2end_test_lib.h Outdated Show resolved Hide resolved
test/core/memory_usage/memory_usage_test.cc Outdated Show resolved Hide resolved
test/cpp/end2end/xds/xds_fallback_end2end_test.cc Outdated Show resolved Hide resolved
test/cpp/end2end/xds/xds_fallback_end2end_test.cc Outdated Show resolved Hide resolved
test/cpp/end2end/xds/xds_fallback_end2end_test.cc Outdated Show resolved Hide resolved
test/cpp/end2end/xds/BUILD Outdated Show resolved Hide resolved
test/cpp/end2end/xds/BUILD Show resolved Hide resolved
Copy link
Contributor Author

@eugeneo eugeneo 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 for reviews. I am still adding test cases but the core code is ready for review.

src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.h Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
test/cpp/end2end/xds/xds_fallback_end2end_test.cc Outdated Show resolved Hide resolved
test/cpp/end2end/xds/xds_fallback_end2end_test.cc Outdated Show resolved Hide resolved
test/core/memory_usage/memory_usage_test.cc Outdated Show resolved Hide resolved
test/cpp/end2end/xds/BUILD Outdated Show resolved Hide resolved
test/cpp/end2end/xds/BUILD Show resolved Hide resolved
eugeneo and others added 4 commits March 20, 2024 12:53
PiperOrigin-RevId: 617335127
…36154)

As per [gRFC A71](https://github.com/grpc/proposal/blob/master/A71-xds-fallback.md).

Closes grpc#36154

COPYBARA_INTEGRATE_REVIEW=grpc#36154 from eugeneo:xds-bootstrap-servers-env-var aada3e7
PiperOrigin-RevId: 617579604
Copy link
Member

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

This is moving in the right direction!

Please let me know if you have any questions. Thanks!

src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
test/cpp/end2end/xds/xds_fallback_end2end_test.cc Outdated Show resolved Hide resolved
test/cpp/end2end/xds/xds_fallback_end2end_test.cc Outdated Show resolved Hide resolved
test/cpp/end2end/xds/xds_end2end_test_lib.h Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
Copy link
Member

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

This is getting closer!

PLMK if you have any questions. Thanks!

src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
Copy link
Contributor Author

@eugeneo eugeneo left a comment

Choose a reason for hiding this comment

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

Thanks for the feedback!

test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
Copy link
Member

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

The tests are better but still need some work. And there was one comment from my previous review pass that you didn't address.

PLMK if you have any questions. Thanks!

test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Show resolved Hide resolved
test/core/xds/xds_client_test.cc Show resolved Hide resolved
test/core/xds/xds_client_test.cc Show resolved Hide resolved
test/core/xds/xds_client_test.cc Show resolved Hide resolved
src/core/ext/xds/xds_client.cc Outdated Show resolved Hide resolved
Copy link
Contributor Author

@eugeneo eugeneo left a comment

Choose a reason for hiding this comment

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

Thanks for the comments. Addressed.

test/core/xds/xds_client_test.cc Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
test/core/xds/xds_client_test.cc Outdated Show resolved Hide resolved
Copy link
Member

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

Just one remaining comment. Feel free to merge after addressing.

resource = watcher->WaitForNextResource();
EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair(
Copy link
Member

Choose a reason for hiding this comment

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

Please move this down to line 4146, so that it's not right in between getting the resource from the watcher and checking the resource's value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks!

@copybara-service copybara-service bot closed this in 4e735be Apr 9, 2024
@eugeneo eugeneo deleted the fallback-review branch April 9, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants