Skip to content

Comments

feat(flags): Allow specifying flags to evaluate#67

Merged
haacked merged 1 commit intomainfrom
haacked/62-specify-flags
Mar 17, 2025
Merged

feat(flags): Allow specifying flags to evaluate#67
haacked merged 1 commit intomainfrom
haacked/62-specify-flags

Conversation

@haacked
Copy link
Collaborator

@haacked haacked commented Mar 16, 2025

This adds support for PostHog/posthog#29493 which allows specifying a set of flag keys to evaluate.

Fixes #62

This adds support for PostHog/posthog#29493 which allows specifying a set of flag keys to evaluate.

Fixes #62
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added support for specifying a subset of feature flags to evaluate via the /decide endpoint, allowing for more efficient feature flag evaluation by only requesting specific flags instead of all flags.

  • Added FlagKeysToEvaluate property to AllFeatureFlagsOptions class, initialized with empty list for backward compatibility
  • Updated GetFeatureFlagsFromDecideAsync in PostHogApiClient to include flag keys in request payload when specified
  • Added predicate-based request handling in FakeHttpMessageHandler to support testing flag key evaluation
  • Added comprehensive test coverage for both local and remote flag evaluation scenarios with specific keys

6 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@haacked haacked merged commit ea321c6 into main Mar 17, 2025
4 checks passed
@haacked haacked deleted the haacked/62-specify-flags branch March 17, 2025 15:53
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.

chore(flags): Add support for specifying a set of keys to evaluate

1 participant