Skip to content

Conversation

@bmartel
Copy link
Contributor

@bmartel bmartel commented Dec 9, 2025

This pull request updates the feature flag resolution logic in label_studio/core/feature_flags/base.py to clarify and enforce the priority order when determining the value of a feature flag. The changes ensure that feature flags are checked in a consistent sequence, making it easier to understand and debug feature flag behavior, especially for testing and deployment environments.

Priority order and logic improvements:

  • Added a clear comment documenting the priority order for feature flag resolution: stale flags, environment variables, Cypress Redis overrides, LaunchDarkly, and default values.
  • Moved and refactored the environment variable check to ensure it is evaluated immediately after stale flags, enforcing the documented priority.
  • Introduced logic to support Cypress Redis feature flag overrides in CYPRESS_ENVIRONMENT, allowing E2E tests to dynamically override flags using session-scoped values.
  • Improved error handling for Cypress overrides to gracefully handle missing modules or runtime errors, logging warnings where appropriate.

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 41e52c0
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/693832f7f4ca5f00080d7acf

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for label-studio-playground canceled.

Name Link
🔨 Latest commit 41e52c0
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/693832f7d1896e000856f457

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for label-studio-storybook canceled.

Name Link
🔨 Latest commit 41e52c0
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/693832f75a96c200085e0fc6

@github-actions github-actions bot added the chore label Dec 9, 2025
@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 41e52c0
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/693832f753b5680009fe591c

@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 22.22222% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.28%. Comparing base (93b7f49) to head (41e52c0).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
label_studio/core/feature_flags/base.py 22.22% 14 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #8967       +/-   ##
============================================
+ Coverage    66.59%   81.28%   +14.68%     
============================================
  Files          828      267      -561     
  Lines        64602    24061    -40541     
  Branches     10986        0    -10986     
============================================
- Hits         43023    19558    -23465     
+ Misses       21575     4503    -17072     
+ Partials         4        0        -4     
Flag Coverage Δ
lsf-e2e ?
lsf-integration ?
lsf-unit ?
pytests 81.28% <22.22%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants