-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Update dependencies and spec support. #19
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
Conversation
1691795 to
5e3c3a6
Compare
| public ProviderEvaluation<Boolean> getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx) { | ||
| EvaluationDetail<Boolean> detail | ||
| = this.client.boolVariationDetail(key, evaluationContextConverter.toLdContext(ctx), defaultValue); | ||
| = this.client.boolVariationDetail(key, evaluationContextConverter.toLdContext(ctx), defaultValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like formatting always changes even when I am using the same rules and the same tools, but at different points in time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEs are weird.
| // Use JUnit test framework | ||
| testImplementation 'junit:junit:4.12' | ||
| testImplementation(platform('org.junit:junit-bom:5.10.0')) | ||
| testImplementation('org.junit.jupiter:junit-jupiter') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted some things from JUnit 5, so I moved forward.
f093359 to
9b7aeb5
Compare
9b7aeb5 to
a605896
Compare
…penfeature-java-server into rlamb/update-spec-support
| test: | ||
| jobs: | ||
| - build-linux | ||
| - test-linux: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropping 1.8 as it isn't supported by the OF Sdk.
| mavenLocal() | ||
| mavenCentral() | ||
| // Before LaunchDarkly release artifacts get synced to Maven Central they are here along with snapshots: | ||
| maven { url "https://oss.sonatype.org/content/groups/public/" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To allow using pre-releases when we want to.
| checkstyleTest.enabled = false | ||
| } | ||
|
|
||
| task generateJava(type: Copy) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template code generation is so we have access to the version to put into the wrapper.
| } | ||
|
|
||
| boolean initialized = client.getDataSourceStatusProvider().waitFor(DataSourceStatusProvider.State.VALID, | ||
| ChronoUnit.FOREVER.getDuration()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun fact, FOREVER, is just the most digits that can put in without an overflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waitFor also should return if we hit the "OFF" state from a terminal error.
|
|
||
| if (!initialized) { | ||
| // Here we throw an exception for the OpenFeature SDK, which will handle emitting an event. | ||
| throw new TimeoutException("Timed out waiting for client to initialize."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case anyone hangs out to see the head death of the universe.
…penfeature-java-server into rlamb/update-spec-support
|
|
||
| Provider(LDClientInterface client) { | ||
| this.client = client; | ||
| logger = client.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We added this in the migrations changes, which is really handy for OpenFeature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the logger change we no longer need provider specific configuration, so this was deleted.
| public ProviderEvaluation<Boolean> getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx) { | ||
| EvaluationDetail<Boolean> detail | ||
| = this.client.boolVariationDetail(key, evaluationContextConverter.toLdContext(ctx), defaultValue); | ||
| = this.client.boolVariationDetail(key, evaluationContextConverter.toLdContext(ctx), defaultValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEs are weird.
No description provided.