Skip to content

Commit 4ddd8b4

Browse files
authored
Track revs that intentionally fork the reconciler (facebook#24671)
* Track revs that intentionaly fork the reconciler When we fork the the "old" and "new" reconciler implementations, it can be difficult to keep track of which commits introduced the delta in behavior. This makes bisecting difficult if one of the changes introduces a bug. I've added a new file called `forked-revisions` that contains the list of commits that intentionally forked the reconcilers. In CI, we'll confirm that the reconcilers are identical except for the changes in the listed revisions. This also ensures that the revisions can be cleanly reverted. * [TEST] Add trivial divergence between forks This should fail CI. We'll see if the next commit fixes it. * [TEST] Update list of forked revisions This should fix CI * Revert temporary fork This reverts the temporary fork added in the previous commits that was used to test CI. * Update error message when CI fails
1 parent 652dcf6 commit 4ddd8b4

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.circleci/config.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,24 @@ jobs:
425425
- checkout
426426
- run: yarn workspaces info | head -n -1 > workspace_info.txt
427427
- *restore_node_modules
428+
- run:
429+
name: Fetch revisions that contain an intentional fork
430+
# This will fetch each revision listed in the `forked-revisions` file,
431+
# which may be necessary if it's not part of main. For example, it
432+
# may have been part of a PR branch that was squashed on merge.
433+
command: |
434+
cut -d " " -f 1 scripts/merge-fork/forked-revisions | xargs -r git fetch origin
435+
- run:
436+
name: Revert forked revisions
437+
# This will revert the changes without committing. At the end, it's
438+
# expected that both forks will be identical.
439+
command: |
440+
cut -d " " -f 1 scripts/merge-fork/forked-revisions | xargs -r git revert --no-commit
428441
- run:
429442
name: Confirm reconciler forks are the same
430443
command: |
431444
yarn replace-fork
432-
git diff --quiet || (echo "Reconciler forks are not the same! Run yarn replace-fork. Or, if this was intentional, disable this CI check." && false)
445+
git diff --quiet || (echo "Reconciler forks are not the same! Run yarn replace-fork. Or, if this was intentional, add the commit SHA to scripts/merge-fork/forked-revisions." && false)
433446
434447
435448
workflows:

scripts/merge-fork/forked-revisions

Whitespace-only changes.

0 commit comments

Comments
 (0)