Skip to content

LUCI try jobs for release branches should use correct builder/recipes #53371

Closed

Description

@christopherfujino

Here is an example of an engine hotfix PR: flutter-team-archive/engine#17306. It passed on Cirrus because the cirrus config is checked in to the PR, but failed on LUCI pre-submit because the master builders were used, which used the latest version of the recipe, which had drifted since stable was cut.

We have hotfix builders that trigger based on a regex of the git refs https://github.com/flutter/infra/blob/master/config/main.star#L20, but when running presubmit, the ref is of the form "refs/pull/17306/head", i.e. it looks like any other PR against master and used the prod builder. Ideally, we should trigger the hotfix builder for PRs made against a hotfix branch (not sure if this is possible).

We should probably update the PR request handler in cocoon to specify the base_ref.

Action items:

  • Refactor BRANCHES dictionary in main.star to be an external JSON file release_branches.json and update relevant documentation. done.
  • Have cocoon read release_branches.json. We need to think about how this will be refreshed. It would be nice if there were some way to trigger cocoon manually to re-fetch it, so that when I update flutter/infra I don't have to wait for a cron job.
  • Update github_webhook.dart to test each incoming PR's "base" (branch) against the current beta and stable release branches from release_branches.json.
  • Replace //cocoon/app_dart/dev/branches.txt with testing-ref data from release_branches.json. Only stable and beta need to be considered.

Activity

  1. godofredoc commented on Apr 15, 2020

    @godofredoc
    Contributor

    @digiter would you mind taking a look?

  2. digiter commented on Apr 23, 2020

    @digiter
    Contributor

    Chris will remove hotfix builders once 1.12.13 is no longer stable.

  3. removed their assignment
    on Apr 23, 2020
  4. christopherfujino commented on Apr 23, 2020

    @christopherfujino
    ContributorAuthor

    Chris will remove hotfix builders once 1.12.13 is no longer stable.

    @digiter However, the issue will still remain that beta/stable pre-submit PRs will use the prod try (master) builders for pre-submit, and are thus likely to be red as they use the wrong recipe version.

  5. changed the title [-]LUCI presubmit builds use prod (latest) builders on hotfix PRs[/-] [+]LUCI presubmit builds use prod (latest) builders on release branches[/+] on Jun 23, 2020
  6. nturgut commented on Jul 28, 2020

    @nturgut
    Contributor

    We encountered this issue in flutter-1.20-candidate.7 ex PR.

    I think a solution will be using github APIs, such as: https://api.github.com/repos/flutter/engine/pulls/20068 This returns JSON. Base object's label has the correct branch name for the PR.

    @christopherfujino suggested adding it to cocoon.

  7. godofredoc commented on Jul 28, 2020

    @godofredoc
    Contributor

    Cocoon already knows the branch but we don't have branch recipe configurations in the cocoon config file. After @keyonghan moves the config files to the repository under test then it will be easier to add per branch configs although it won't be the ideal configuration yet.

  8. changed the title [-]LUCI presubmit builds use prod (latest) builders on release branches[/-] [+]LUCI try jobs for release branches should use correct builder/recipes[/+] on Aug 20, 2020
  9. added
    P1High-priority issues at the top of the work list
    on Sep 1, 2020
  10. christopherfujino commented on Sep 1, 2020

    @christopherfujino
    ContributorAuthor

    FYI @keyonghan I created 4 action items. I'll land the first one this week since it blocks the rest, and then when either of us have extra cycles we can try to fill out the rest.

  11. christopherfujino commented on Sep 3, 2020

    @christopherfujino
    ContributorAuthor

    So it turns out reading a JSON file from a lucicfg file (i.e. main.star) is non-trivial, as it provides a to_json() built-in function API ref, but not a from_json().

  12. removed their assignment
    on Oct 13, 2021
  13. godofredoc commented on Nov 18, 2021

    @godofredoc
    Contributor

    This can be done with minimal effort in the following way:

    • Recipes repository is branched out along with engine and framework.
    • Recipes bundler is configured to create bundles for main and release branches
    • buildbucket class is extended to support exe property, e.g '{"exe": {"cipdPackage": "","cipdVersion": ""}}'
    • The scheduler propagates the target branch all the way from the webhook to the ScheduleBuild request.
  14. godofredoc commented on Nov 18, 2021

    @godofredoc
    Contributor
  15. CaseyHillers commented on Nov 18, 2021

    @CaseyHillers
    Contributor

    This is a much more elegant solution than I had in mind!

  16. self-assigned this
    on Jan 5, 2022
  17. github-actions commented on Mar 7, 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.

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

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.team-infraOwned by Infrastructure team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions