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: Add support for client-side prerequisite events. #593

Closed
wants to merge 5 commits into from

Conversation

kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Sep 25, 2024

This PR contains the server-side implementation for allFlagsState evaluation for bootstrap, server-side LDEvaluationDetail, client-side LDEvaluationDetail, and client-side events for prerequisites.

BEGIN_COMMIT_OVERRIDE
feat: Add support for client-side prerequisite events.
feat: Add support for prerequisite details to evaluation detail.
feat: Add prerequisite information to server-side allFlagsState.
END_COMMIT_OVERRIDE

if (value === undefined || value === null) {
this.logger.debug('Result value is null. Providing default value.');
successDetail.value = defaultValue;
}

successDetail.prerequisites?.forEach((prereqKey) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Send prerequisite events in order before the event for the variation. This matches server behavior.

},
eventFactory,
);
this.evaluateCb(flag, context, resolve, eventFactory);
Copy link
Member Author

Choose a reason for hiding this comment

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

Unrelated change, but originally the cb version was added after the non-cb version. The interior code was the same, so the async eval can be implemented in terms of the callback eval.

Copy link
Member Author

Choose a reason for hiding this comment

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

This file updates because of unfortunate shared data. Not related to required updates.

Copy link
Member Author

Choose a reason for hiding this comment

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

This file updates because of unfortunate shared data. Not related to required updates.

Copy link
Member Author

Choose a reason for hiding this comment

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

This file updates because of unfortunate shared data. Not related to required updates.

@kinyoklion
Copy link
Member Author

We have decided to go with version B.

@kinyoklion kinyoklion closed this Oct 10, 2024
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.

1 participant