Skip to content

[FSSDK-8971] feat: add FetchQualifiedSegments to Decide #364

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

Merged
merged 11 commits into from
Mar 3, 2023

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.

@@ -12,7 +12,7 @@ require (
github.com/golang-jwt/jwt/v4 v4.5.0
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy