-
Notifications
You must be signed in to change notification settings - Fork 81
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 #452
Conversation
a85bc56
to
992dded
Compare
@@ -262,6 +270,15 @@ func evaluateAllShared(w http.ResponseWriter, req *http.Request, sdkKind basicty | |||
} | |||
valueObj.Maybe("debugEventsUntilDate", flag.DebugEventsUntilDate != 0). | |||
Float64(float64(flag.DebugEventsUntilDate)) |
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.
All of this to say.. here's the new behavior implemented by the PR.
af67c72
to
3668f83
Compare
@@ -32,7 +33,8 @@ func (a *apiHelper) logResult(desc string, err error) error { | |||
return nil | |||
} | |||
addInfo := "" | |||
if gse, ok := err.(ldapi.GenericOpenAPIError); ok { | |||
var gse *ldapi.GenericOpenAPIError | |||
if errors.As(err, &gse) { |
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.
This little bug (the error is a pointer) was causing response bodies not to be logged.
@@ -0,0 +1,131 @@ | |||
//go:build integrationtests |
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.
This is a whole new builder scheme just for these tests - we need a simple way to create flags via REST API. The existing methods were single-purpose.
🤖 I have created a release *beep* *boop* --- ## [8.10.0](v8.9.6...v8.10.0) (2024-10-17) ### Features * add support for client-side prerequisite events ([#452](#452)) ([9dea4b5](9dea4b5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR updates Relay's client-side evaluation logic to track the top-level prerequisites associated with a flag.
These prerequisites are then passed back in the response as a
prerequisites
key, allowing client-side SDKs to properly emit prerequisite events.