[EventEngine] Enable the EventEngine DNS Resolver on Posix (#35573)

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #35573

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35573 from yijiem:enable-oss-ee-dns-posix-real 1df91d1d84
PiperOrigin-RevId: 609193851
pull/35967/head^2
Yijie Ma 9 months ago committed by Copybara-Service
parent 51bccbdcf9
commit 9db40fa845
  1. 12
      bazel/experiments.bzl
  2. 2
      src/core/lib/experiments/experiments.cc
  3. 3
      src/core/lib/experiments/experiments.h
  4. 2
      src/core/lib/experiments/rollouts.yaml
  5. 5
      test/core/end2end/tests/cancel_after_invoke.cc
  6. 5
      test/core/end2end/tests/cancel_with_status.cc
  7. 11
      test/cpp/ext/filters/census/stats_plugin_end2end_test.cc

@ -204,9 +204,6 @@ EXPERIMENTS = {
"dbg": {
},
"off": {
"cancel_ares_query_test": [
"event_engine_dns",
],
"compression_test": [
"v3_compression_filter",
],
@ -244,9 +241,6 @@ EXPERIMENTS = {
"logging_test": [
"promise_based_server_call",
],
"resolver_component_tests_runner_invoker": [
"event_engine_dns",
],
"resource_quota_test": [
"free_large_allocator",
"unconstrained_max_quota_buffer_size",
@ -257,6 +251,9 @@ EXPERIMENTS = {
],
},
"on": {
"cancel_ares_query_test": [
"event_engine_dns",
],
"core_end2end_test": [
"event_engine_listener",
],
@ -276,6 +273,9 @@ EXPERIMENTS = {
"round_robin_delegate_to_pick_first",
"wrr_delegate_to_pick_first",
],
"resolver_component_tests_runner_invoker": [
"event_engine_dns",
],
"surface_registered_method_lookup": [
"registered_method_lookup_in_transport",
],

@ -719,7 +719,7 @@ const ExperimentMetadata g_experiment_metadata[] = {
{"event_engine_client", description_event_engine_client,
additional_constraints_event_engine_client, nullptr, 0, false, true},
{"event_engine_dns", description_event_engine_dns,
additional_constraints_event_engine_dns, nullptr, 0, false, false},
additional_constraints_event_engine_dns, nullptr, 0, true, false},
{"event_engine_listener", description_event_engine_listener,
additional_constraints_event_engine_listener, nullptr, 0, true, true},
{"free_large_allocator", description_free_large_allocator,

@ -194,7 +194,8 @@ inline bool IsCanaryClientPrivacyEnabled() { return false; }
inline bool IsClientIdlenessEnabled() { return true; }
inline bool IsClientPrivacyEnabled() { return false; }
inline bool IsEventEngineClientEnabled() { return false; }
inline bool IsEventEngineDnsEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS
inline bool IsEventEngineDnsEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER
inline bool IsEventEngineListenerEnabled() { return true; }
inline bool IsFreeLargeAllocatorEnabled() { return false; }

@ -69,7 +69,7 @@
default:
# not tested on iOS at all
ios: broken
posix: false
posix: true
# TODO(yijiem): resolve when the WindowsEventEngine DNS Resolver is
# implemented
windows: broken

@ -23,6 +23,7 @@
#include <grpc/status.h>
#include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/lib/gprpp/time.h"
#include "test/core/end2end/end2end_tests.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
@ -36,6 +37,8 @@ const Duration kDeadlineTimeout = Duration::Seconds(2);
void CancelAfterInvoke6(CoreEnd2endTest& test,
std::unique_ptr<CancellationMode> mode,
Duration timeout) {
test.InitClient(ChannelArgs());
test.InitServer(ChannelArgs().Set(GRPC_ARG_PING_TIMEOUT_MS, 5000));
auto c = test.NewClientCall("/service/method").Timeout(timeout).Create();
CoreEnd2endTest::IncomingStatusOnClient server_status;
CoreEnd2endTest::IncomingMetadata server_initial_metadata;
@ -57,6 +60,8 @@ void CancelAfterInvoke6(CoreEnd2endTest& test,
void CancelAfterInvoke5(CoreEnd2endTest& test,
std::unique_ptr<CancellationMode> mode,
Duration timeout) {
test.InitClient(ChannelArgs());
test.InitServer(ChannelArgs().Set(GRPC_ARG_PING_TIMEOUT_MS, 5000));
auto c = test.NewClientCall("/service/method").Timeout(timeout).Create();
CoreEnd2endTest::IncomingStatusOnClient server_status;
CoreEnd2endTest::IncomingMetadata server_initial_metadata;

@ -24,6 +24,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
#include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/lib/gprpp/time.h"
#include "test/core/end2end/end2end_tests.h"
@ -64,6 +65,8 @@ CORE_END2END_TEST(CoreEnd2endTest, CancelWithStatus2) {
}
CORE_END2END_TEST(CoreEnd2endTest, CancelWithStatus3) {
InitClient(ChannelArgs());
InitServer(ChannelArgs().Set(GRPC_ARG_PING_TIMEOUT_MS, 5000));
auto c = NewClientCall("/foo").Timeout(Duration::Minutes(1)).Create();
CoreEnd2endTest::IncomingMetadata server_initial_metadata;
CoreEnd2endTest::IncomingStatusOnClient server_status;
@ -83,6 +86,8 @@ CORE_END2END_TEST(CoreEnd2endTest, CancelWithStatus3) {
}
CORE_END2END_TEST(CoreEnd2endTest, CancelWithStatus4) {
InitClient(ChannelArgs());
InitServer(ChannelArgs().Set(GRPC_ARG_PING_TIMEOUT_MS, 5000));
auto c = NewClientCall("/foo").Timeout(Duration::Minutes(1)).Create();
CoreEnd2endTest::IncomingMetadata server_initial_metadata;
CoreEnd2endTest::IncomingStatusOnClient server_status;

@ -32,6 +32,7 @@
#include <grpc++/grpc++.h>
#include <grpcpp/opencensus.h>
#include "src/core/lib/experiments/experiments.h"
#include "src/cpp/ext/filters/census/context.h"
#include "src/cpp/ext/filters/census/grpc_plugin.h"
#include "src/cpp/ext/filters/census/open_census_call_tracer.h"
@ -662,8 +663,14 @@ TEST_F(StatsPluginEnd2EndTest,
auto sent_span_data =
GetSpanByName(recorded_spans, absl::StrCat("Sent.", client_method_name_));
ASSERT_NE(sent_span_data, recorded_spans.end());
EXPECT_TRUE(
IsAnnotationPresent(sent_span_data, "Delayed name resolution complete."));
// TODO(yijiem): the EventEngine DNS resolver might be faster in getting the
// result before TryCheckResolution and the call would not be queued:
// https://github.com/grpc/grpc/blob/master/src/core/ext/filters/client_channel/client_channel.cc#L2340.
// We could use a FakeResolver and introduce a delay to deflake this test.
if (!grpc_core::IsEventEngineDnsEnabled()) {
EXPECT_TRUE(IsAnnotationPresent(sent_span_data,
"Delayed name resolution complete."));
}
// Check presence of trace annotation for removal from channel's pending
// lb pick queue.
auto attempt_span_data = GetSpanByName(

Loading…
Cancel
Save