Skip to content

Commit 09700a9

Browse files
Further fixes
1 parent 7c06431 commit 09700a9

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.datadog.featureflag.utils
1+
package com.datadog.featureflag
22

33
import static com.datadog.featureflag.utils.TestUtils.EvaluationTest
44
import static com.datadog.featureflag.utils.TestUtils.parseConfiguration

dd-java-agent/agent-featureflag/src/test/groovy/com/datadog/featureflag/ExposureWriterTests.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import static datadog.trace.agent.test.server.http.TestHttpServer.httpServer
44

55
import com.datadog.featureflag.exposure.ExposureEvent
66
import com.datadog.featureflag.exposure.ExposuresRequest
7-
import com.datadog.featureflag.utils.AbstractJsonTestSuiteBasedTests
87
import com.datadog.featureflag.utils.TestUtils
98
import com.squareup.moshi.Moshi
109
import datadog.trace.agent.test.server.http.TestHttpServer

dd-java-agent/agent-featureflag/src/test/groovy/com/datadog/featureflag/FeatureFlagEvaluatorTests.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package com.datadog.featureflag
22

33
import static com.datadog.featureflag.utils.TestUtils.parseConfiguration
44

5-
import com.datadog.featureflag.utils.AbstractJsonTestSuiteBasedTests
65
import com.datadog.featureflag.utils.TestUtils
76
import datadog.trace.api.featureflag.FeatureFlagEvaluator
87

dd-smoke-tests/springboot-java-11/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ dependencies {
2525
implementation project(':dd-smoke-tests:iast-util:iast-util-11')
2626

2727
// open feature flag provider
28-
implementation(libs.openfeature.sdk)
2928
api(project(':dd-trace-api:openfeature'))
3029
}
3130

dd-trace-api/openfeature/src/main/java/datadog/trace/api/openfeature/Provider.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ private ImmutableMetadata mapFlagMetadata(final Map<String, Object> metadata) {
110110
builder.addInteger(key, (Integer) value);
111111
} else if (value instanceof Float) {
112112
builder.addFloat(key, (Float) value);
113-
}
114-
if (value instanceof Long) {
113+
} else if (value instanceof Long) {
115114
builder.addLong(key, (Long) value);
116115
} else if (value instanceof Double) {
117116
builder.addDouble(key, (Double) value);
@@ -120,7 +119,7 @@ private ImmutableMetadata mapFlagMetadata(final Map<String, Object> metadata) {
120119
} else if (value instanceof Boolean) {
121120
builder.addBoolean(key, (Boolean) value);
122121
} else {
123-
LOGGER.warn(
122+
LOGGER.debug(
124123
"Invalid key provided in metadata {}:{}",
125124
key,
126125
value == null ? "null" : value.getClass());
@@ -142,10 +141,12 @@ private <V, R> ProviderEvaluation<V> mapResolution(
142141
.reason(result.getReason())
143142
.variant(result.getVariant())
144143
.flagMetadata(mapFlagMetadata(result.getFlagMetadata()))
144+
.errorCode(mapErrorCode(result.getErrorCode()))
145+
.errorMessage(result.getErrorMessage())
145146
.build();
146147
}
147148

148-
private static ErrorCode errorCode(final ResolutionError code) {
149+
private static ErrorCode mapErrorCode(final ResolutionError code) {
149150
try {
150151
return ErrorCode.valueOf(code.name());
151152
} catch (final IllegalArgumentException e) {

metadata/supported-configurations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
"DD_EXCEPTION_REPLAY_MAX_FRAMES_TO_CAPTURE": ["A"],
184184
"DD_EXPERIMENTAL_API_SECURITY_ENABLED": ["A"],
185185
"DD_EXPERIMENTAL_DEFER_INTEGRATIONS_UNTIL": ["A"],
186+
"DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED": ["A"],
186187
"DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED": ["A"],
187188
"DD_FORCE_CLEAR_TEXT_HTTP_FOR_INTAKE_CLIENT": ["A"],
188189
"DD_GIT_BRANCH": ["A"],

0 commit comments

Comments
 (0)