From 686140abd10c7537c097b47dff298f9d77440d64 Mon Sep 17 00:00:00 2001 From: ludamad Date: Tue, 13 Feb 2024 10:32:22 +0000 Subject: [PATCH] fix(noir-mirror): don't update .gitrepo on push (#4555) We no longer need a commit on aztec side, and if we forgo this we're a bit more robust actually because then the base URL is always the last pull There is a heuristic for finding the last commit that should be considered 'synced' for commit message computation purposes. The heuristic failed because 1. there were extra commits in aztec packages after our pull 2. then when we fell back to our gitrepo commit, it was changed on sync To fix this, we can exploit not needing to actually know our last pushed commit as we know squash. This way, our 'commit' variable in our .gitrepo is always our last *pull* and not pull or push --- .github/workflows/mirror_noir_subrepo.yml | 5 ++--- noir/.gitrepo | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mirror_noir_subrepo.yml b/.github/workflows/mirror_noir_subrepo.yml index 2c8174675c5..165f3133f53 100644 --- a/.github/workflows/mirror_noir_subrepo.yml +++ b/.github/workflows/mirror_noir_subrepo.yml @@ -95,9 +95,8 @@ jobs: COMMIT=$(git rev-parse HEAD) # Now push to it with subrepo with computed commit messages if ./scripts/git-subrepo/lib/git-subrepo push $SUBREPO_PATH --squash --branch=$STAGING_BRANCH; then + # We don't push a commit to aztec anymore so that we can maintain the 'commit' as our last pull branch git reset $COMMIT - git commit --allow-empty --amend -am "$(git log -1 --pretty=%B) [skip ci]" - git push else echo "Problems syncing noir. We may need to pull the subrepo." exit 1 @@ -109,7 +108,7 @@ jobs: cd noir-repo git fetch # see recent change git checkout $BRANCH || git checkout -b $BRANCH - git merge -Xtheirs $STAGING_BRANCH + git merge -Xtheirs origin/$STAGING_BRANCH git push origin $BRANCH cd .. } diff --git a/noir/.gitrepo b/noir/.gitrepo index 2274fa26d93..f8b66efc119 100644 --- a/noir/.gitrepo +++ b/noir/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = https://github.com/noir-lang/noir branch = aztec-packages - commit = 5f5843e35052b9d3599b8ab4f7633db0a225e82f - parent = e5ca533ea4513cf3c6b7e3eb057083838b861a6b + commit = 6ff518af281afe601edb8574d425b07d9d2f9c5d + parent = 2082fedfb03d4882a269881f51c5337263bc539b method = merge cmdver = 0.4.6