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

feat: Initial Configuration #79

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ java {
}

group = 'cloud.eppo'
version = '3.0.2-SNAPSHOT'
version = '3.1.0-SNAPSHOT'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")

import org.apache.tools.ant.filters.ReplaceTokens
Expand All @@ -31,7 +31,7 @@ repositories {

dependencies {
// Re-export classes and interfaces that will be used upstream
api 'cloud.eppo:sdk-common-jvm:3.0.2'
api 'cloud.eppo:sdk-common-jvm:3.2.0-SNAPSHOT'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Using snapshot until release is cut/pushed


implementation 'com.github.zafarkhaja:java-semver:0.10.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.1'
Expand All @@ -40,7 +40,7 @@ dependencies {
// Logback classic 1.3.x is compatible with java 8
implementation 'ch.qos.logback:logback-classic:1.3.14'

testImplementation 'cloud.eppo:sdk-common-jvm:3.0.0-SNAPSHOT:tests'
testImplementation 'cloud.eppo:sdk-common-jvm:3.2.0-SNAPSHOT:tests'
testImplementation platform('org.junit:junit-bom:5.10.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'com.github.tomakehurst:wiremock-jre8:2.35.2'
Expand Down
12 changes: 11 additions & 1 deletion src/main/java/com/eppo/sdk/EppoClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,17 @@ private EppoClient(
BanditLogger banditLogger,
boolean isGracefulModel) {
super(
apiKey, host, sdkName, sdkVersion, assignmentLogger, banditLogger, isGracefulModel, false);
apiKey,
host,
sdkName,
sdkVersion,
assignmentLogger,
banditLogger,
null,
isGracefulModel,
false,
true,
null);
}

/** Stops the client from polling Eppo for updated flag and bandit configurations */
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/eppo/sdk/EppoClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ private void uninitClient() {
private void initBuggyClient() {
try {
EppoClient eppoClient = initClient(DUMMY_FLAG_API_KEY);
Field configurationStoreField = BaseEppoClient.class.getDeclaredField("requestor");
Field configurationStoreField = BaseEppoClient.class.getDeclaredField("configurationStore");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

base implementation changed to access config only through the store.

configurationStoreField.setAccessible(true);
configurationStoreField.set(eppoClient, null);
} catch (NoSuchFieldException | IllegalAccessException e) {
Expand Down
Loading