From 45c70f818d8985a2915095aab4998cd1e534c8e7 Mon Sep 17 00:00:00 2001 From: Damien Mehala Date: Mon, 29 Jan 2024 14:19:09 +0100 Subject: [PATCH] fix: remote configuration default targets version --- src/datadog/remote_config.h | 2 +- test/test_remote_config.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/datadog/remote_config.h b/src/datadog/remote_config.h index a4521a75..86ccfc2d 100644 --- a/src/datadog/remote_config.h +++ b/src/datadog/remote_config.h @@ -30,7 +30,7 @@ class RemoteConfigurationManager { // Represents the *current* state of the RemoteConfigurationManager. // It is also used to report errors to the remote source. struct State { - uint64_t targets_version = 1; + uint64_t targets_version = 0; std::string opaque_backend_state; Optional error_message; }; diff --git a/test/test_remote_config.cpp b/test/test_remote_config.cpp index 3bf06bfe..0c002a53 100644 --- a/test/test_remote_config.cpp +++ b/test/test_remote_config.cpp @@ -41,7 +41,7 @@ REMOTE_CONFIG_TEST("first payload") { CHECK(payload["client"]["client_tracer"]["service"] == "testsvc"); CHECK(payload["client"]["client_tracer"]["env"] == "test"); CHECK(payload["client"]["state"]["root_version"] == 1); - CHECK(payload["client"]["state"]["targets_version"] == 1); + CHECK(payload["client"]["state"]["targets_version"] == 0); } REMOTE_CONFIG_TEST("response processing") {