@samitouri / QOS-React-2 / commits / 4ddd8b455c

Track revs that intentionally fork the reconciler (#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

Andrew Clark committed Jun 6, 2022 at 11:53 UTC 4ddd8b455ce1dac02c56a18790d5068a7714c1a0
2 files changed +14 -1
.circleci/config.yml
+14 -1
@@ -425,11 +425,24 @@ jobs:
425 - checkout
426 - run: yarn workspaces info | head -n -1 > workspace_info.txt
427 - *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
441 - run:
442 name: Confirm reconciler forks are the same
443 command: |
444 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)
446
447
448 workflows:
scripts/merge-fork/forked-revisions