Skip to content

fix: preserve LaunchDarkly boolean defaults#8055

Open
Sanjays2402 wants to merge 1 commit into
Flagsmith:mainfrom
Sanjays2402:fix/8047-launchdarkly-boolean-default
Open

fix: preserve LaunchDarkly boolean defaults#8055
Sanjays2402 wants to merge 1 commit into
Flagsmith:mainfrom
Sanjays2402:fix/8047-launchdarkly-boolean-default

Conversation

@Sanjays2402

Copy link
Copy Markdown

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Closes #8047

Boolean LaunchDarkly imports now derive the environment default from the served fallthrough or off variation instead of the separate on/off toggle. Unsupported rollout or non-boolean values retain the existing toggle fallback.

How did you test this code?

Added focused tests for on-but-serving-false and off-but-serving-true configurations. The focused pytest cases, Ruff, formatting, Mypy, and both outgoing diff gates pass.

Resolve boolean flag defaults from the served fallthrough or off variation instead of the LaunchDarkly on toggle. Add focused coverage for both inverted cases.
@Sanjays2402
Sanjays2402 requested a review from a team as a code owner July 21, 2026 09:27
@Sanjays2402
Sanjays2402 requested review from khvn26 and removed request for a team July 21, 2026 09:27
@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

@Sanjays2402 is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0daee9de-1a6e-46e1-8298-a7cc524f3ebb

📥 Commits

Reviewing files that changed from the base of the PR and between 5785e8c and 47f5e05.

📒 Files selected for processing (2)
  • api/integrations/launch_darkly/services.py
  • api/tests/unit/integrations/launch_darkly/test_services.py

📝 Walkthrough

Walkthrough

Boolean LaunchDarkly feature-state imports now derive enabled from the selected boolean variation: fallthrough.variation when the flag is on, or offVariation when it is off. The resulting value is persisted in FeatureState defaults. A parametrised unit test covers both configuration paths using mocked persistence and related side effects.

Estimated code review effort: 2 (Simple) | ~10 minutes


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the api Issue related to the REST API label Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LaunchDarkly importer sets boolean enabled from LD 'on', ignoring served variation (inverts on-but-serving-false flags)

1 participant