From a0a8bd2222176cec3b4131100937ffda2cf4df7c Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Thu, 13 Jun 2024 16:06:16 -0500 Subject: [PATCH] build: remove the CIPD patch from depot tools (#42484) * build: try to remove the CIPD patch from depot tools * build: remove cipd patch from GHA --- .circleci/config/base.yml | 19 ------------------- .github/actions/checkout/action.yml | 5 ----- .github/workflows/config/gclient.diff | 14 -------------- .../pipeline-segment-electron-build.yml | 3 --- .../pipeline-segment-electron-test.yml | 3 --- .../pipeline-segment-node-nan-test.yml | 4 ---- 6 files changed, 48 deletions(-) delete mode 100644 .github/workflows/config/gclient.diff diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index 5b9e62f6bfff..7c0266603a9f 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -253,25 +253,6 @@ step-depot-tools-get: &step-depot-tools-get sed -i '' '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja else sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja - # Remove swift-format dep from cipd on macOS until we send a patch upstream. - cd depot_tools - cat > gclient.diff \<< 'EOF' - diff --git a/gclient.py b/gclient.py - index c305c248..e6e0fbdc 100755 - --- a/gclient.py - +++ b/gclient.py - @@ -783,7 +783,8 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): - not condition or "non_git_source" not in condition): - continue - cipd_root = self.GetCipdRoot() - - for package in dep_value.get('packages', []): - + packages = dep_value.get('packages', []) - + for package in (x for x in packages if "infra/3pp/tools/swift-format" not in x.get('package')): - deps_to_add.append( - CipdDependency(parent=self, - name=name, - EOF - git apply --3way gclient.diff fi # Ensure depot_tools does not update. test -d depot_tools && cd depot_tools diff --git a/.github/actions/checkout/action.yml b/.github/actions/checkout/action.yml index 241e93c67bfa..af876a8f7e8b 100644 --- a/.github/actions/checkout/action.yml +++ b/.github/actions/checkout/action.yml @@ -21,12 +21,7 @@ runs: shell: bash run: | git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git - sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja - # Remove swift-format dep from cipd on macOS until we send a patch upstream. - cd depot_tools - git apply --3way ../src/electron/.github/workflows/config/gclient.diff - # Ensure depot_tools does not update. test -d depot_tools && cd depot_tools touch .disable_auto_update diff --git a/.github/workflows/config/gclient.diff b/.github/workflows/config/gclient.diff deleted file mode 100644 index 4a035b8c991f..000000000000 --- a/.github/workflows/config/gclient.diff +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/gclient.py b/gclient.py -index 59e2b4c5197928bdba1ef69bdbe637d7dfe471c1..b4bae5e48c83c84bd867187afaf40eed16e69851 100755 ---- a/gclient.py -+++ b/gclient.py -@@ -783,7 +783,8 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): - not condition or "non_git_source" not in condition): - continue - cipd_root = self.GetCipdRoot() -- for package in dep_value.get('packages', []): -+ packages = dep_value.get('packages', []) -+ for package in (x for x in packages if "infra/3pp/tools/swift-format" not in x.get('package')): - deps_to_add.append( - CipdDependency(parent=self, - name=name, diff --git a/.github/workflows/pipeline-segment-electron-build.yml b/.github/workflows/pipeline-segment-electron-build.yml index ce5af65cdb03..4842a368e031 100644 --- a/.github/workflows/pipeline-segment-electron-build.yml +++ b/.github/workflows/pipeline-segment-electron-build.yml @@ -115,9 +115,6 @@ jobs: # Ensure depot_tools does not update. test -d depot_tools && cd depot_tools - if [ "`uname`" = "Linux" ]; then - git apply --3way ../src/electron/.github/workflows/config/gclient.diff - fi touch .disable_auto_update - name: Add Depot Tools to PATH run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH diff --git a/.github/workflows/pipeline-segment-electron-test.yml b/.github/workflows/pipeline-segment-electron-test.yml index 5b89e4ff3c6a..8f49a1bd1523 100644 --- a/.github/workflows/pipeline-segment-electron-test.yml +++ b/.github/workflows/pipeline-segment-electron-test.yml @@ -70,9 +70,6 @@ jobs: sed -i '' '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja else sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja - # Remove swift-format dep from cipd on macOS until we send a patch upstream. - cd depot_tools - git apply --3way ../src/electron/.github/workflows/config/gclient.diff fi # Ensure depot_tools does not update. test -d depot_tools && cd depot_tools diff --git a/.github/workflows/pipeline-segment-node-nan-test.yml b/.github/workflows/pipeline-segment-node-nan-test.yml index 6c60015b1727..103ed5ce9bea 100644 --- a/.github/workflows/pipeline-segment-node-nan-test.yml +++ b/.github/workflows/pipeline-segment-node-nan-test.yml @@ -65,8 +65,6 @@ jobs: run: | git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja - cd depot_tools - git apply --3way ../src/electron/.github/workflows/config/gclient.diff # Ensure depot_tools does not update. test -d depot_tools && cd depot_tools touch .disable_auto_update @@ -126,8 +124,6 @@ jobs: run: | git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja - cd depot_tools - git apply --3way ../src/electron/.github/workflows/config/gclient.diff # Ensure depot_tools does not update. test -d depot_tools && cd depot_tools touch .disable_auto_update