chore: remove the slow flaky e2e/patrol suite - #1098
Merged
Conversation
The GPS-mocked e2e suite (patrol + a fake GeoClue2 D-Bus service) was slow and almost never green: iOS, Web, macOS and Windows were all already continue-on-error, and the one remaining blocking mobile job (Android) flaked on Patrol's native permission dialog. A suite that's mostly red and ignored provides no real signal, so drop it in favour of the fast, reliable mockito unit tests plus the location-prepare build/analyze jobs. - Delete .github/workflows/e2e.yaml and .github/scripts/fake_geoclue2.py. - Delete packages/location/example/integration_test/ and the Patrol Android test runner (androidTest/MainActivityTest.java). - Remove patrol (and the now-unused integration_test) from the example's dev_dependencies, and its instrumentation-runner / orchestrator wiring from android/app/build.gradle. - patrol was the sole cause of the macOS build failure, so prepare-macos no longer needs continue-on-error -- it's now a normal blocking job. Native code is still compiled on every PR by location-prepare (build apk / build ios / build macos); only the runtime behaviour checks that never ran reliably are gone. The Dart layer and MethodChannel contract stay covered by the unit tests in packages/*/test/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The GPS-mocked e2e suite (patrol + a fake GeoClue2 D-Bus service) is slow and almost never green. In the workflow,
iOS,Web,macOSandWindowswere all alreadycontinue-on-error, and the only remaining blocking mobile job —Android— flaked on Patrol's native permission dialog (grantPermissionWhenInUse() ... 404). A suite that's mostly red and ignored gives no trustworthy signal while costing CI minutes and a lot of maintenance. Replace it with what already works: the fast, deterministic mockito unit tests plus thelocation preparebuild/analyze jobs.Bonus:
patrolwas the single root cause of most of the recent pain — the macOS build failure (could not build module 'patrol'), the iOS runner-target gap, the web flake, the Android native-permission flake, and the Java 8obsolete optionswarnings. Removing it clears all of them.Changes
.github/workflows/e2e.yamland.github/scripts/fake_geoclue2.py.packages/location/example/integration_test/and the Patrol Android test runner (androidTest/MainActivityTest.java).patrol(and the now-unusedintegration_test) from the exampledev_dependencies, plus itsPatrolJUnitRunner/ orchestrator wiring inandroid/app/build.gradle.patrolwas the sole reasonprepare-macoswascontinue-on-error; it's now a normal blocking job, solocation preparecan go fully green.Coverage after this
packages/location/test(11 tests),packages/location_platform_interface/test(37 tests) — the Dart facade and the MethodChannel contract.location prepare:flutter analyze,dart format, unit tests, andflutter build apk/ios/macos— so native compile breaks are still caught.Verification
flutter analyzeon the example: no issues.location11/11,location_platform_interface37/37 green.patrolreferences remain in tracked source (lockfile/plugin registrants are gitignored and regenerate onpub get).