sentry-dart icon indicating copy to clipboard operation
sentry-dart copied to clipboard

Report Flutter framework feature flags

Open ueman opened this issue 7 months ago • 1 comments

:scroll: Description

There's a Flutter framework (draft) PR that adds feature flags to Flutter itself. This PR supports that

:bulb: Motivation and Context

I want know whether a specific build used one of the feature flags.

:green_heart: How did you test it?

I didn't. I'm not really sure how to even test this with a non-flaky test.

:pencil: Checklist

  • [x] I reviewed submitted code
  • [x] I added tests to verify changes
  • [x] No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • [x] I updated the docs if needed
  • [x] All tests passing
  • [x] No breaking changes

:crystal_ball: Next steps

I'll keep this a draft until the linked PR is merged for some time. Afterwards this PR can be landed.

ueman avatar Jun 14 '25 16:06 ueman

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.89%. Comparing base (81f83eb) to head (31bf545). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ns/flutter_framework_feature_flag_integration.dart 92.30% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2991      +/-   ##
==========================================
+ Coverage   87.74%   88.89%   +1.15%     
==========================================
  Files         286       97     -189     
  Lines        9719     3522    -6197     
==========================================
- Hits         8528     3131    -5397     
+ Misses       1191      391     -800     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jun 14 '25 16:06 codecov[bot]

I would still wait with merging this PR until the linked PR is merged

ueman avatar Jul 03 '25 13:07 ueman

@buenaflor The dependent PR in the Flutter framework has landed, so I would say we can go ahead and merge this PR

ueman avatar Jul 15 '25 09:07 ueman

@ueman sounds good

also does the cursor review make sense? if not we can just ignore it

buenaflor avatar Jul 15 '25 09:07 buenaflor

I assume those cases should not happen since the flags are supplied by the flutter tool and not user generated, but I added code and tests for them anyway

ueman avatar Jul 15 '25 09:07 ueman