[roll] Roll infra/recipes [checkout] Stop rebasing patches on branch head

Previously, this code would rebase unsubmitted changes on top of the
destination branch (normally `main`) when doing a checkout. The
reasoning was that it increases the probability of catching conflicts
with CLs that land around the same time, versus rebasing on top of the
version of the repository currently pinned in the checkout.

However, since we rolled out support for atomic cross-repo changes via
Depends-on footers, it's become important to respect the currently
pinned versions of repositories to avoid the following situation:

1. Co-dependent changes A1 and B1 land on the `main` branch in
   repositories A and B (but don't roll yet).
2. An engineer starts a presubmit run on an unrelated CL A2 in
   repository A.
3. Each presubmit builder on CL A2 does an initial checkout that doesn't
   include A1 or B1 because they haven't rolled into integration yet.
4. Each presubmit builder then patches in A2 using the `jiri patch
   --rebase-branch=main`, which rebases A2 on top of A's main branch
   (which includes A1).
5. The build fails because A1 and B1 are co-dependent, but the checkout
   only includes A1, and not B1.

The window of time during which this happens can be as long as 5-10
minutes depending on how long A1 and B1 take to roll. This turns atomic
multi-repo change submission back into a breaking change, at least from
the perspective of presubmit builders on other CLs.

By rebasing on top of the current local HEAD in step #4 instead of on
top of the branch tip, we avoid this situation and ensure we always
include both changes in an atomic set, or neither, when doing a
presubmit checkout.

I also updated the "changed files" logic to respect the new base
revision, and also to respect not just the main CL but any CLs patched
in due to "Depends-on" footers, which it didn't respect before.

Original-Bug: 426620623
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/recipes/+/1293666
Original-Revision: 72f807243c9f588b0c56e8c1b7f898d4faa4c50c
GitOrigin-RevId: 9efc9e5775e596f07aafab42df89b2f7a3deefb4
Change-Id: I41362c77b7fb9389d678c03b864e629211cea7fe
1 file changed
tree: 5e84c9e82a64fba113731df61ec6666e77b9abbc
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. flower
  6. jiri.lock
  7. MILESTONE
  8. minimal
  9. prebuilts
  10. README.md
  11. stem
  12. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.