Skip to content

Conversation

andrewleap-optimizely
Copy link
Contributor

Summary

  • FetchSegments and FetchSegmentsOptions added to the Decide endpoint.
  • If FetchSegments is true, FetchQualifiedSegments is called from within Decide.

Ticket

FSSDK-8971

@andrewleap-optimizely andrewleap-optimizely changed the title [FSSDK-8971] feat: add fetch qualified segments to decide [FSSDK-8971] feat: add FetchQualifiedSegments to Decide Mar 2, 2023
Copy link
Contributor

@yasirfolio3 yasirfolio3 left a comment

Choose a reason for hiding this comment

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

looks good, just some minor changes required.

github.com/google/uuid v1.3.0
github.com/lestrrat-go/jwx v0.9.0
github.com/optimizely/go-sdk v1.8.3
github.com/optimizely/go-sdk v1.8.4-0.20230216074708-27b2772ccf33
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be done using go mod tidy and go mod clean to automatically update go.sum and remove irrelevant indirect dependencies which were needed by go-sdk 1.8.3.

DecideOptions []string `json:"decideOptions"`
ForcedDecisions []ForcedDecision `json:"forcedDecisions,omitempty"`
FetchSegments bool `json:"fetchSegments"`
FetchSegmentsOptions []segment.OptimizelySegmentOption `json:"fetchSegmentsOptions,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we confirm that if user sends a wrong value here then this will not break? maybe have 3 unit tests:

  1. pass a single incorrect value in array
  2. pass a mixture of correct and incorrect values
  3. pass a empty array

Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

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

Looks great!
Can we update openapi.yml (new decide request params, 5xx error response on fetechSegments failure)?

Copy link
Contributor

@yasirfolio3 yasirfolio3 left a comment

Choose a reason for hiding this comment

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

LGTM, just needs an update to openapi.yaml as @jaeopt suggested.

Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewleap-optimizely andrewleap-optimizely marked this pull request as ready for review March 3, 2023 17:24
@andrewleap-optimizely andrewleap-optimizely merged commit c8c3b06 into master Mar 3, 2023
@andrewleap-optimizely andrewleap-optimizely deleted the aleap/add_fetch_qualified_segments branch March 3, 2023 17:54
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