Skip to content

Plugins CI should run for each framework change #33440

Closed

Description

@amirh

Breaking changes in the framework sometimes break plugins code.
As the flutter/plugins plugins are running against master on CI, but are required to also work on latest stable it often makes it challenging to "fix" the issue in the plugins repository. 2 recent examples:

  1. Add template type parameter to invokeMethod calls in the plugins repo #26431
  2. Revive the "set marker icon" sample for Google Maps #33438

I suggest that we block landing framework PRs that are breaking the plugins repository. While seemingly this might leave the author with a chicken-and-egg problem(how can they update the plugin code to adapt to the breaking change before the framework change has landed), but not blocking landing the change just moves the issue downstream(we can't update the plugin code before the breaking change made it to stable).

So we should solve this chicken-and-egg issue early on when there's still the option to re-plan the landing process(e.g land the change in 2 phases, the second phase lands only after the first phase made it to stable).

Activity

  1. amirh commented on May 28, 2019

    @amirh
    ContributorAuthor

    Adding to that - while flutter/plugins can be used as a canary for the entire plugin ecosystem, it doesn't cover the entire ecosystem. e.g if some plugin out there is using the ImageStreamListener in their code(not in the example app) the author must choose whether to support Flutter stable or master.

    @Hixie what do you think about amending the framework breaking change policy, requiring that it must be possible for code that's using the changed API to be adapted such that it works both after the change, but also with the stable channel prior to the change. This will force us to land breaking changes in a phased way (e.g add the new ImageStreamListener API, and only remove the one we're deprecating after the change has made it to stable). Or find some other creative solutions(ifdefs?) to avoid the chicken-and-egg problem.

  2. added this to the milestone on May 28, 2019
  3. Hixie commented on May 30, 2019

    @Hixie
    Contributor

    I think as a general rule that may be overly strict, but certainly we should have a policy of not making breaking changes in such a way that we are forced to break our plugin compatibility policy!

  4. Hixie commented on May 30, 2019

    @Hixie
    Contributor
  5. amirh commented on May 30, 2019

    @amirh
    ContributorAuthor

    So maybe adding something like this to the breaking change guidelines?

    When planning a breaking change, consider potential plugin code that is affected by the change. Remember that plugins must be working with both Flutter stable and master channels, some breaking changes(e.g renaming a method) can force plugins to choose between supporting stable or master, in these cases land your change in a way that allows plugin authors to support both channels at any given point of time(e.g first add a method with a new name, and after that change is in stable remove the previously named method)

  6. Hixie commented on Jun 3, 2019

    @Hixie
    Contributor

    I think so long as we have tests that run the plugins against master and against tip of tree, and we make those tests run on precommit for framework tests, we should automatically cover this situation without needing more prose in the (already quite long) style guide.

  7. amirh commented on Jun 3, 2019

    @amirh
    ContributorAuthor

    I'm not sure that running tests against flutter/plugins is enough(we should do it nevertheless). When making a breaking change we need to think of a plugin out there that is using the framework feature we are breaking even if non of the flutter/plugins plugins are using it.

  8. Hixie commented on Jun 3, 2019

    @Hixie
    Contributor

    If they care about not being broken, they should also add there tests to our precommit tests. That's what the test framework I'm working on is all about.

  9. amirh commented on Jun 3, 2019

    @amirh
    ContributorAuthor

    What about non open source plugins? or plugins that cannot be added to flutter/tests for some other reason?

  10. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  11. removed this from the milestone on Aug 17, 2020
  12. stuartmorgan-g commented on Jun 24, 2022

    @stuartmorgan-g
    Contributor

    Running the just the analysis tests (as we are already doing) seems like the right tradeoff of catching things early without a huge extra test burden on flutter/flutter (longer test times, more flake, etc.). Breakage outside of analyze is relatively rare.

    Given that, I'm going to close this as complete.

  13. github-actions commented on Jul 8, 2022

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  14. locked as resolved and limited conversation to collaborators on Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.packageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions