Repository navigation
fix: update Dio to 5.11.1 and handle transformation timeouts - #116
MohamedGawdat wants to merge 3 commits into
Conversation
What: Handle transformation timeouts as transient event-delivery failures, add regression tests, and test locked and latest Dio versions in CI. Why: Dio 5.10 added an enum value that made event processing fail to compile. Matching the new value by name preserves compatibility with older Dio versions. Await the initial flush in the cooldown test to avoid a timer race. How to test: Run flutter test and dart analyze with Dio 5.3.2 and 5.11.1.
There was a problem hiding this comment.
1 issue found across 3 files
Confidence score: 5/5
flagsmith_experiments_test.dartcovers retry/drop logging but does not verify the emitted logs or follow the required Given/When/Then structure. Add the scenario comments and expected-log assertions perAGENTS.mdTE03/TE05.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="test/fg/flagsmith_experiments_test.dart">
<violation number="1" location="test/fg/flagsmith_experiments_test.dart:761">
P3: These new cases exercise retry/drop logging but do not assert the emitted logs or include the required Given/When/Then sections. Add scenario comments and expected-log assertions to each case, per `AGENTS.md` TE03/TE05.</violation>
</file>
Reply to a comment to ask cubic a question or push back. It learns from your replies.
Re-trigger cubic
| // Resolve by name so these tests also compile with Dio before 5.10.0. | ||
| for (final type in DioExceptionType.values | ||
| .where((type) => type.name == 'transformTimeout')) { | ||
| test('When every response transformation times out, then batch is kept', |
There was a problem hiding this comment.
P3: These new cases exercise retry/drop logging but do not assert the emitted logs or include the required Given/When/Then sections. Add scenario comments and expected-log assertions to each case, per AGENTS.md TE03/TE05.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At test/fg/flagsmith_experiments_test.dart, line 761:
<comment>These new cases exercise retry/drop logging but do not assert the emitted logs or include the required Given/When/Then sections. Add scenario comments and expected-log assertions to each case, per `AGENTS.md` TE03/TE05.</comment>
<file context>
@@ -755,6 +755,66 @@ void main() {
+ // Resolve by name so these tests also compile with Dio before 5.10.0.
+ for (final type in DioExceptionType.values
+ .where((type) => type.name == 'transformTimeout')) {
+ test('When every response transformation times out, then batch is kept',
+ () async {
+ dio.interceptors.add(InterceptorsWrapper(onRequest: (options, h) {
</file context>
What: Restore the existing CI workflow and tests. Why: Keep this change focused on the Dio transformation-timeout build error. How to test: Run the existing test suite and dart analyze with Dio 5.11.1.
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.
Re-trigger cubic
What: Require Dio ^5.11.1, update its lockfile entry, and explicitly handle DioExceptionType.transformTimeout in the event processor. Why: Handle every Dio error type so event processing compiles successfully. How to test: Run the existing Flutter tests and dart analyze with Dio 5.11.1.
There was a problem hiding this comment.
0 issues found across 3 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.
Re-trigger cubic
Update Dio to
^5.11.1and addDioExceptionType.transformTimeoutto the event processor's retryable timeout cases. This resolves the non-exhaustive switch compilation error. The lockfile records Dio 5.11.1.Fixes #112.
Validation: the existing test suite passes with Dio 5.11.1 (227 passed, 1 existing skipped test),
dart analyzereports no issues, and formatting checks pass.