From 1ecc644dbb996221be6776cb253a68bddee28d26 Mon Sep 17 00:00:00 2001 From: ludamad Date: Mon, 21 Oct 2024 19:32:17 -0400 Subject: [PATCH 1/3] fix: ci github clone edge case overdue --- .github/ensure-builder/action.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/ensure-builder/action.yml b/.github/ensure-builder/action.yml index 753c2e6b6ec..0983c61512d 100644 --- a/.github/ensure-builder/action.yml +++ b/.github/ensure-builder/action.yml @@ -69,6 +69,16 @@ runs: # Set up a context for this run - name: Copy Repo to Builder shell: bash + env: + UNPACK: | + [ -d ~/run-$RUN_ID ] || ( + mkdir -p ~/run-$RUN_ID-git && + cd ~/run-$RUN_ID-git && tar xzf - && + git config --global advice.detachedHead false && + git clone ~/run-$RUN_ID-git/.git ~/run-$RUN_ID && + echo ${{ env.BUILD_INSTANCE_SSH_KEY }} | base64 --decode > ~/.ssh/build_instance_key && + chmod 600 ~/.ssh/build_instance_key + ) run: | sudo shutdown -P ${{ steps.select_instance.outputs.ttl }} set -x @@ -76,14 +86,7 @@ runs: if ! scripts/run_on_builder "[ -d ~/run-$RUN_ID ]" ; then echo "Copying local repo to spot" tar czf - .git | scripts/run_on_builder \ - "mkdir -p ~/run-$RUN_ID-git && cd ~/run-$RUN_ID-git && tar xzf -" || true - scripts/run_on_builder " - echo "Unpacking repo" - git config --global advice.detachedHead false - git clone ~/run-$RUN_ID-git/.git ~/run-$RUN_ID - echo ${{ env.BUILD_INSTANCE_SSH_KEY }} | base64 --decode > ~/.ssh/build_instance_key - chmod 600 ~/.ssh/build_instance_key - " || true + "flock ~/git.lock bash -c '$UNPACK'" fi - name: Attach EBS Cache Disk From 4b223119f7aaa0e9618007cbe07697ff6ffd30c9 Mon Sep 17 00:00:00 2001 From: ludamad Date: Mon, 21 Oct 2024 19:40:04 -0400 Subject: [PATCH 2/3] Update action.yml --- .github/ensure-builder/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ensure-builder/action.yml b/.github/ensure-builder/action.yml index 0983c61512d..ab2a9e95d39 100644 --- a/.github/ensure-builder/action.yml +++ b/.github/ensure-builder/action.yml @@ -85,7 +85,7 @@ runs: # detect run folder if ! scripts/run_on_builder "[ -d ~/run-$RUN_ID ]" ; then echo "Copying local repo to spot" - tar czf - .git | scripts/run_on_builder \ + (tar czf - .git || true) | scripts/run_on_builder \ "flock ~/git.lock bash -c '$UNPACK'" fi From 5883b3f54ab3443d9707a02ab2525a5f408ccfee Mon Sep 17 00:00:00 2001 From: ludamad Date: Mon, 21 Oct 2024 19:52:13 -0400 Subject: [PATCH 3/3] Update README.md --- yarn-project/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/README.md b/yarn-project/README.md index 9c4c5010812..11437af9c9d 100644 --- a/yarn-project/README.md +++ b/yarn-project/README.md @@ -48,7 +48,7 @@ Consider installing the Prettier and ESLint extensions if using VSCode. Configur ## Package.json inheritance -To simplify the management of all package.json files, we have a custom script that injects the contents of `package.common.json` into all packages that reference it via the `inherits` custom field. To run the script, just run +To simplify the management of all package.json files, we have a custom script that injects the contents of `package.common.json` into all packages that reference it via the `inherits` custom field. To run the script, just run: ``` yarn prepare