Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Nov 2, 2023

No description provided.

@kinyoklion kinyoklion force-pushed the rlamb/update-spec-support branch 5 times, most recently from 1691795 to 5e3c3a6 Compare November 2, 2023 20:34
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);
Copy link
Member Author

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.

Copy link
Contributor

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')
Copy link
Member Author

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.

@kinyoklion kinyoklion force-pushed the rlamb/update-spec-support branch 5 times, most recently from f093359 to 9b7aeb5 Compare November 2, 2023 20:49
@kinyoklion kinyoklion force-pushed the rlamb/update-spec-support branch from 9b7aeb5 to a605896 Compare November 2, 2023 20:54
test:
jobs:
- build-linux
- test-linux:
Copy link
Member Author

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/" }
Copy link
Member Author

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) {
Copy link
Member Author

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());
Copy link
Member Author

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.

Copy link
Member Author

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.");
Copy link
Member Author

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.

@kinyoklion kinyoklion marked this pull request as ready for review November 2, 2023 22:08
@kinyoklion kinyoklion requested a review from a team November 2, 2023 22:09

Provider(LDClientInterface client) {
this.client = client;
logger = client.getLogger();
Copy link
Member Author

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.

Copy link
Member Author

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);
Copy link
Contributor

Choose a reason for hiding this comment

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

IDEs are weird.

@kinyoklion kinyoklion merged commit bc5b610 into main Nov 2, 2023
@kinyoklion kinyoklion deleted the rlamb/update-spec-support branch November 2, 2023 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants