Skip to content

[FSSDK-11526] parse holdout from datafile into project config #1074

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 4 commits into from
Jul 1, 2025

Conversation

raju-opti
Copy link
Contributor

@raju-opti raju-opti commented Jul 1, 2025

Summary

  • also added getHoldoutsForFlag() function

Test plan

  • added tests for new functionalities

Issues

  • FSSDK-11526
  • FSSDK-11527

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for parsing holdout configurations from the datafile into ProjectConfig and provides a helper to retrieve holdouts per flag.

  • Introduces ExperimentCore and Holdout types and extends Experiment
  • Extends ProjectConfig with holdout-related fields and implements parseHoldoutsConfig
  • Adds getHoldoutsForFlag helper and corresponding tests; a feature toggle is added in feature_toggle.ts

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/shared_types.ts Extracted ExperimentCore, added Holdout type
lib/project_config/project_config.ts Added holdout fields, parseHoldoutsConfig, and helper
lib/project_config/project_config.spec.ts Added tests for holdout parsing and retrieval
lib/index.browser.ts Imported new featureToggle module
lib/feature_toggle.ts Defined holdout feature flag stub
Comments suppressed due to low confidence (3)

lib/shared_types.ts:121

  • This interface property is missing a trailing semicolon, which will cause a TypeScript syntax error. Add a semicolon after the closing brace.
}

lib/index.browser.ts:22

  • [nitpick] The imported featureToggle module isn't used in this file. If holdout logic isn't needed here, consider removing this import to clean up unused code.
import * as featureToggle from './feature_toggle';

lib/project_config/project_config.spec.ts:35

  • [nitpick] The mock import from node:test isn't used in these tests. Removing unused imports can improve readability.
import { mock } from 'node:test';

@coveralls
Copy link

coveralls commented Jul 1, 2025

Coverage Status

coverage: 79.473% (-0.3%) from 79.751%
when pulling 466dc88 on raju/holdout_config
into a7b62d9 on master.

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. One missing part is to cover "optional" includeFlags and excludeFlags.

@raju-opti raju-opti requested a review from jaeopt July 1, 2025 17:18
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

Copy link

@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.

LGTM

@raju-opti raju-opti merged commit 51438cf into master Jul 1, 2025
15 of 20 checks passed
@raju-opti raju-opti deleted the raju/holdout_config branch July 1, 2025 19:24
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.

4 participants