Skip to content

Commit

Permalink
mobile: Force the dfp_mixed_scheme flag to true in Envoy Mobile (#31586)
Browse files Browse the repository at this point in the history
Envoy Mobile always requires dfp_mixed_scheme for the TLS and cleartext
DFP clusters. While dfp_mixed_scheme defaults to true, some environments
(like within Google), force it to false for the Envoy use case, so we
force it back to true here in Envoy Mobile, so we don't break the mobile
integration tests.

Once general use of dfp_mixed_scheme is fixed everywhere, we can revert
this commit.

Tested by changing dfp_mixed_scheme to FALSE_RUNTIME_GUARD and running
the mobile xDS integration tests:

cd mobile
bazelisk test --test_output=streamed --cache_test_results=no //test/common/integration:rtds_integration_test

Signed-off-by: Ali Beyad <[email protected]>
  • Loading branch information
abeyad authored Jan 2, 2024
1 parent 917d6c9 commit a585f2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions mobile/library/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ envoy_cc_library(
"//library/common/types:c_types_lib",
"@envoy//envoy/server:lifecycle_notifier_interface",
"@envoy//envoy/stats:stats_interface",
"@envoy//source/common/runtime:runtime_lib",
"@envoy_build_config//:extension_registry",
],
)
Expand Down
6 changes: 6 additions & 0 deletions mobile/library/common/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "source/common/api/os_sys_calls_impl.h"
#include "source/common/common/lock_guard.h"
#include "source/common/runtime/runtime_features.h"

#include "library/common/bridge/utility.h"
#include "library/common/data/utility.h"
Expand All @@ -19,6 +20,11 @@ Engine::Engine(envoy_engine_callbacks callbacks, envoy_logger logger,
// registry may lead to crashes at Engine shutdown. To be figured out as part of
// https://github.com/envoyproxy/envoy-mobile/issues/332
Envoy::Api::External::registerApi(std::string(envoy_event_tracker_api_name), &event_tracker_);
// Envoy Mobile always requires dfp_mixed_scheme for the TLS and cleartext DFP clusters.
// While dfp_mixed_scheme defaults to true, some environments force it to false (e.g. within
// Google), so we force it back to true in Envoy Mobile.
// TODO(abeyad): Remove once this is no longer needed.
Runtime::maybeSetRuntimeGuard("envoy.reloadable_features.dfp_mixed_scheme", true);
}

envoy_status_t Engine::run(const std::string config, const std::string log_level) {
Expand Down

0 comments on commit a585f2d

Please sign in to comment.