Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Ensure package repo is not broken after a new package is published. #105327

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

Open
cyanglaz opened this issue Jun 3, 2022 · 1 comment
Open

Ensure package repo is not broken after a new package is published. #105327

cyanglaz opened this issue Jun 3, 2022 · 1 comment
Labels
c: contributor-productivity Team-specific productivity, code health, technical debt. P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. team-ecosystem Owned by Ecosystem team triaged-ecosystem Triaged by Ecosystem team

Comments

@cyanglaz
Copy link
Contributor

cyanglaz commented Jun 3, 2022

This is inspired by #105182

I will use the exact plugins in this incident to describe the issue, but the issue can happen on any plugin in the repo.

This is the sequence of the events that caused a breakage.

  1. A commit landed and updated video_player version. The commit passed post commit CI.
  2. The new version of video_player is released.
  3. A new commit is landed on master/main, it is not related to video_player or image_picker. (So presubmit didn't run any image_picker tests)
  4. Image_picker's example app depends on video_player, and the example app contains some tests. Because video_player's new version is released, image_picker runs the tests with the new video_player version the first time on CI, and the new version of video_player broke the image_picker test, which caused the ci to fail.

The breakage was around dependencies in androidx test libraries. I have very limited knowledge on this topic so I'm not sure how severe the damage could be. My guess is that any flutter app that has the same set up as image_picker_example would break if they depend on video_player.

The bigger issue is that we don't know if the video_player breaks other flutter apps out there, it was nice that we had image_picker_example depends on video_player, which caught the issue. It would be even better to have this failure show up before we publish the video_player, so that we can catch that and fixing the issue before landing/releasing video_player.

@stuartmorgan-g
Copy link
Contributor

The problem with implementing what the title requests is that either it's very expensive (we pathify everything and then re-run all tests), or we lose other coverage (we pathify everything before running any tests, and never run any tests against what's actually in the wild already, thus masking a different set of potential bugs).

What we can do though is handle special cases. https://github.com/flutter/plugins/blob/12dcd85a1eb2e382673671ff1d19ceb69db15914/.cirrus.yml#L143-L154 is the one example we have of this so far, where we re-run just analyze on our own packages that could be directly affected by publishing changes, which was created because that was a common form of post-publish failure.

I think we could make a good argument for doing the same for this specific case: we have more cross-plugin dependencies in our example apps than is typical for most of our packages, and the specific issue of Android build incompatibilities in those example builds has bit us before. I think it would be reasonable to add another special case where we pathify and then re-run just Android builds.

@stuartmorgan-g stuartmorgan-g added c: contributor-productivity Team-specific productivity, code health, technical debt. P2 Important issues not at the top of the work list labels Jun 6, 2022
@stuartmorgan-g stuartmorgan-g changed the title Ensure plugin/package repo is not broken after a new plugin/package is published. Ensure package repo is not broken after a new package is published. Mar 6, 2023
@stuartmorgan-g stuartmorgan-g added package flutter/packages repository. See also p: labels. and removed plugin labels Mar 6, 2023
@flutter-triage-bot flutter-triage-bot bot added team-ecosystem Owned by Ecosystem team triaged-ecosystem Triaged by Ecosystem team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: contributor-productivity Team-specific productivity, code health, technical debt. P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. team-ecosystem Owned by Ecosystem team triaged-ecosystem Triaged by Ecosystem team
Projects
None yet
Development

No branches or pull requests

2 participants