Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporarily Disabling Flaky Integration Tests in Plugin Example Apps #8109

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jesswrd
Copy link
Contributor

@jesswrd jesswrd commented Nov 15, 2024

Temporarily skipping flaky integration tests in plugin example apps for camera, camera_android, and camera_android_camerax to safely land #8037.

The flakes are unrelated to the mentioned PR and can likley be traced back to the following issues:
flutter/flutter#154682
flutter/flutter#157556

Partially addresses flutter/flutter#152656

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Copy link
Contributor

@matanlurey matanlurey left a comment

Choose a reason for hiding this comment

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

Let's leave a TODO linking to an issue to renable these tests (could repurpose the ones you have already for Camille), i.e. at every line where you wrote skip: true. There should be at least one example in the repo if you want a reference.

This is important because otherwise we permanently skip test coverage which can have worse implications down the line.

Thanks for creating the PR!

@jesswrd
Copy link
Contributor Author

jesswrd commented Nov 15, 2024

Thanks for the explanation! done.

Copy link
Contributor

@camsim99 camsim99 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for this :)

@stuartmorgan
Copy link
Contributor

Are we sure these are flaky tests? The referenced PR is creating a situation that one of the referenced issues says will break the test, and the PR appears to be failing every Android camera package, even with retries. What's the evidence that this is pre-existing flake rather than the PR actually breaking the tests?

@camsim99
Copy link
Contributor

@stuartmorgan can confirm this test is broken by something in the plugin not flaky and should be disabled until I can investigate.

flutter/flutter#154682 has evidence of it failing locally in the past.
b/376074365 has further evidence of this previously being broken.

I know these don't reference camera but if those run on Android expect them to fail too because I'm guessing that CameraX doesn't support lower resolutions anymore but need to look into it this week. I believe the test only appears to be flaky because it doesn't run all of the time.

If you need more proof, let me know and I can validate its broken-ness to help unblock #8037!

@camsim99
Copy link
Contributor

Ah I just noticed #8037 (comment). It's possible that the bugs I've seen are related to bumping the target SDK version (though I don't think the b/376074365 is; it appears it's even more broken after the target SDK bump).

@stuartmorgan would a good compromise be not bumping the target SDK version until I fix the tests? @jesswrd not sure if your change #8037 relies on that or not.

@jesswrd
Copy link
Contributor Author

jesswrd commented Nov 18, 2024

@stuartmorgan would a good compromise be not bumping the target SDK version until I fix the tests? @jesswrd not sure if your change #8037 relies on that or not.

@camsim99 I can't merge without bumping the target sdk version. Google Play requires a target sdk version of at least 33, so I upgraded the target sdk version for camera, camera_android, and camera_android_camera_androidx. I get an error if I don't.

@stuartmorgan Given the above, I think I should disable the tests, but let me know how you'd like me to proceed.

@stuartmorgan
Copy link
Contributor

stuartmorgan commented Nov 18, 2024

flutter/flutter#154682 has evidence of it failing locally in the past.

Right, but it was failing in a PR that tried to bump the SDK version. And so the camera part was backed out of that PR. That's not flake, that's deterministic failure under the same conditions as the new PR.

It just seems like there's a mismatch here, where this PR describes the failures as "flakes [...] unrelated to the mentioned PR", but what I'm seeing is significant evidence that the failures are in fact directly caused by that PR, for reasons that have been previously established last time we tried to roll the target SDK.

I believe the test only appears to be flaky because it doesn't run all of the time.

It runs any time anyone touches camera or and android sub-package, and also any time all tests run (such as every roll). If it were failing consistently on main, we would definitely know.

AFAICT the state is that it's fine on main, but attempting to roll the target SDK forward will break it. If we believe that the test is wrong and we want to disable it to roll the target SDK forward we can, but we should be clear that we are doing that—explicitly disabling a working test in order to land a PR that breaks that test—not disabling a flaky test. (And I would suggest we do the disabling in the PR that breaks the tests, in that case.)

@camsim99
Copy link
Contributor

AFAICT the state is that it's fine on main, but attempting to roll the target SDK forward will break it. If we believe that the test is wrong and we want to disable it to roll the target SDK forward we can, but we should be clear that we are doing that—explicitly disabling a working test in order to land a PR that breaks that test—not disabling a flaky test. (And I would suggest we do the disabling in the PR that breaks the tests, in that case.)

This SGTM!

@jesswrd
Copy link
Contributor Author

jesswrd commented Nov 18, 2024

AFAICT the state is that it's fine on main, but attempting to roll the target SDK forward will break it. If we believe that the test is wrong and we want to disable it to roll the target SDK forward we can, but we should be clear that we are doing that—explicitly disabling a working test in order to land a PR that breaks that test—not disabling a flaky test. (And I would suggest we do the disabling in the PR that breaks the tests, in that case.)

Sounds good. I'll disable the working tests in #8037 and add a note in the PR description.

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

Successfully merging this pull request may close these issues.

4 participants