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: Refactor variation method and consistency tracking. #264

Merged
merged 8 commits into from
Aug 31, 2023

Conversation

kinyoklion
Copy link
Member

Was reviewing my code and Mathew's and noticed some inconsistencies in how we approach the consistency check. Node correctly only did the check when sampled, but exposed more information than we want. So we have changed the two SDKs to be consistent with each other. So go now only samples when we want, and node will expose less information,

@@ -307,7 +307,7 @@ export default class LDClientImpl implements LDClient {
key: string,
context: LDContext,
defaultValue: LDMigrationStage,
): Promise<LDMigrationDetail> {
Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed this as it isn't "detail" any longer.

const convertedContext = Context.fromLDContext(context);
const [{ detail }, flag] = await this.evaluateIfPossible(
key,
context,
defaultValue,
this.eventFactoryWithReasons,
this.eventFactoryDefault,
Copy link
Member Author

Choose a reason for hiding this comment

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

Should not include reasons by default for the evaluation event associated with the migration. It will be in the migration_op event.

@kinyoklion kinyoklion marked this pull request as ready for review August 31, 2023 17:07
@kinyoklion kinyoklion merged commit 7c08e82 into feat/node-migrations Aug 31, 2023
13 checks passed
@kinyoklion kinyoklion deleted the rlamb/refactor-variation-method branch August 31, 2023 22:34
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.

2 participants