Skip to content

Conversation

@esrakartalOpt
Copy link
Contributor

@esrakartalOpt esrakartalOpt commented Oct 17, 2025

Summary

  • Update impression event handling
  • Notification for global holdout
  • Created new test cases for the impression event and notification
  • Moved all holdout test cases to new file

Test plan

PR checks

Issues

@esrakartalOpt esrakartalOpt marked this pull request as ready for review October 20, 2025 16:42
@alexjoeyyong alexjoeyyong self-requested a review October 21, 2025 19:07
Copy link

@alexjoeyyong alexjoeyyong left a comment

Choose a reason for hiding this comment

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

This pull request introduces improvements to how holdouts are handled for feature flags in the Optimizely codebase. The changes focus on ensuring that only active holdouts are considered, updating the logic to use flag IDs instead of keys, and improving the robustness of variation selection for holdouts. Additionally, new test data for holdouts has been added to the spec parameters. LGTM

Copy link

@pvcraven pvcraven left a comment

Choose a reason for hiding this comment

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

This does appear to improve impression event handling, global holdout notifications, adds test cases and rearranges holdout tests. Don't see any bugs.

Copy link
Contributor

@Mat001 Mat001 left a comment

Choose a reason for hiding this comment

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

lgtm w minor comment

end

def get_holdouts_for_flag(flag_key)
def get_holdouts_for_flag(flag_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

HAven't done event handling yet for holdouts myself, but I wonder here, it could be a potential bug if flag_key is used accidentally instead of flag_id in this PR. Are there any checks needed to make sure we use flag_id?
I'm not 100% sure, just pointing to this in case a check is needed. Does swift sdk has any additional guards maybe etc

Copy link
Contributor

Choose a reason for hiding this comment

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

We can a comment for better clarification. For Swift flag_id is none optional, so there is no way to pass null value.

Copy link
Contributor

@muzahidul-opti muzahidul-opti 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 to me

end

def get_holdouts_for_flag(flag_key)
def get_holdouts_for_flag(flag_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can a comment for better clarification. For Swift flag_id is none optional, so there is no way to pass null value.

@esrakartalOpt esrakartalOpt merged commit 0abc6f0 into master Oct 22, 2025
10 checks passed
@esrakartalOpt esrakartalOpt deleted the esra/FSSDK-11578_impression_and_notification branch October 22, 2025 14:09
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.

5 participants