Skip to content

Set addFeatureFlag value parameter to dynamic and ignore non-boolean values#2849

Merged
buenaflor merged 3 commits intomainfrom
fix/feature-flags-api
Apr 10, 2025
Merged

Set addFeatureFlag value parameter to dynamic and ignore non-boolean values#2849
buenaflor merged 3 commits intomainfrom
fix/feature-flags-api

Conversation

@buenaflor
Copy link
Copy Markdown
Contributor

It must accept a key of type string and a value which is a union of string, boolean, integer, float, and structure

the specs allow for multiple types even though we only accept booleans currently.

This will be advantageous in the future when we eventually allow more types.

#skip-changelog

@buenaflor buenaflor requested review from denrase and removed request for krystofwoldrich and stefanosiano April 9, 2025 10:40
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.76%. Comparing base (0aa80ac) to head (38de869).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2849      +/-   ##
==========================================
- Coverage   87.78%   87.76%   -0.03%     
==========================================
  Files         269      269              
  Lines        8970     8971       +1     
==========================================
- Hits         7874     7873       -1     
- Misses       1096     1098       +2     

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

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2025

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1260.59 ms 1275.16 ms 14.57 ms
Size 8.43 MiB 9.99 MiB 1.56 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
1b0c8a3 1259.30 ms 1282.78 ms 23.48 ms
6a3cb89 1244.43 ms 1262.86 ms 18.43 ms
9d43f71 1225.06 ms 1227.06 ms 2.00 ms
6e083bb 1244.33 ms 1264.60 ms 20.26 ms
62dde43 1258.43 ms 1276.81 ms 18.38 ms
136c365 1248.12 ms 1277.33 ms 29.20 ms
0095354 1241.96 ms 1269.25 ms 27.29 ms
77db8d4 1228.47 ms 1248.80 ms 20.33 ms
c70e01a 1273.00 ms 1299.12 ms 26.12 ms
e0f6628 1250.57 ms 1274.86 ms 24.29 ms

App size

Revision Plain With Sentry Diff
1b0c8a3 8.38 MiB 9.75 MiB 1.37 MiB
6a3cb89 8.42 MiB 9.89 MiB 1.47 MiB
9d43f71 8.29 MiB 9.39 MiB 1.10 MiB
6e083bb 8.16 MiB 9.17 MiB 1.01 MiB
62dde43 8.16 MiB 9.17 MiB 1.01 MiB
136c365 8.38 MiB 9.75 MiB 1.37 MiB
0095354 8.38 MiB 9.78 MiB 1.40 MiB
77db8d4 8.38 MiB 9.73 MiB 1.35 MiB
c70e01a 8.16 MiB 9.17 MiB 1.01 MiB
e0f6628 8.32 MiB 9.50 MiB 1.18 MiB

Previous results on branch: fix/feature-flags-api

Startup times

Revision Plain With Sentry Diff
b5b4343 1262.19 ms 1270.76 ms 8.57 ms

App size

Revision Plain With Sentry Diff
b5b4343 8.43 MiB 9.99 MiB 1.56 MiB

Copy link
Copy Markdown
Collaborator

@denrase denrase left a comment

Choose a reason for hiding this comment

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

Just one question.

static ISentrySpan? getSpan() => _hub.getSpan();

static Future<void> addFeatureFlag(String name, bool value) async {
static Future<void> addFeatureFlag(String name, dynamic value) async {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we allow dynamic users could set whole objects, or would we check for string, int type etc?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@buenaflor buenaflor merged commit 3f8357e into main Apr 10, 2025
149 of 154 checks passed
@buenaflor buenaflor deleted the fix/feature-flags-api branch April 10, 2025 12:29
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.

2 participants