aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2024-04-03 09:44:12 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2024-04-08 15:01:42 +0000
commit0fc9b4d6e3b1d3817ba8ed5213a66800b89ad2c9 (patch)
tree95efdb4d2994e30f9123f415ba49264063f0f7b9
parentf710649ffb8b4fd514cc990169e875db8424f22c (diff)
downloadtoolchain-utils-0fc9b4d6e3b1d3817ba8ed5213a66800b89ad2c9.tar.gz
llvm_tools: remove REMOVE_PATCHES failure mode
This failure mode seems completely unused, and the concept of removing all patches before a certain rev (but only if any patches fail) is kind of odd. Instead, we should just have a cronjob that ensures this is done regularly. BUG=b:332589934 TEST=repo upload Change-Id: Idc25ad61031f70ceb717b8a35219b521a820b6c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/5420772 Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: George Burgess <gbiv@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org>
-rw-r--r--llvm_tools/README.md10
-rw-r--r--llvm_tools/failure_modes.py1
-rwxr-xr-xllvm_tools/patch_manager.py6
-rwxr-xr-xllvm_tools/update_chromeos_llvm_hash.py5
-rwxr-xr-xllvm_tools/update_chromeos_llvm_hash_unittest.py2
5 files changed, 1 insertions, 23 deletions
diff --git a/llvm_tools/README.md b/llvm_tools/README.md
index f556c8a0..8072155e 100644
--- a/llvm_tools/README.md
+++ b/llvm_tools/README.md
@@ -156,16 +156,6 @@ $ ./patch_manager.py \
--failure_mode disable_patches
```
-For example, to remove all patches that no longer apply:
-
-```
-$ ./patch_manager.py \
- --svn_version 367622 \
- --patch_metadata_file /abs/path/to/patch/file \
- --src_path /abs/path/to/src/tree \
- --failure_mode remove_patches
-```
-
For example, to bisect a failing patch and stop at the first bisected patch:
```
diff --git a/llvm_tools/failure_modes.py b/llvm_tools/failure_modes.py
index b9355b7e..0df81194 100644
--- a/llvm_tools/failure_modes.py
+++ b/llvm_tools/failure_modes.py
@@ -14,7 +14,6 @@ class FailureModes(enum.Enum):
CONTINUE = "continue"
DISABLE_PATCHES = "disable_patches"
BISECT_PATCHES = "bisect_patches"
- REMOVE_PATCHES = "remove_patches"
# Only used by 'bisect_patches'.
INTERNAL_BISECTION = "internal_bisection"
diff --git a/llvm_tools/patch_manager.py b/llvm_tools/patch_manager.py
index 33272286..bee4c964 100755
--- a/llvm_tools/patch_manager.py
+++ b/llvm_tools/patch_manager.py
@@ -285,11 +285,6 @@ def main(sys_argv: List[str]):
)
PrintPatchResults(result)
- def _remove(args):
- patch_utils.remove_old_patches(
- args.svn_version, llvm_src_dir, patches_json_fp
- )
-
def _disable(args):
patch_cmd = patch_utils.git_am if args.git_am else patch_utils.gnu_patch
patch_utils.update_version_ranges(
@@ -317,7 +312,6 @@ def main(sys_argv: List[str]):
dispatch_table = {
failure_modes.FailureModes.FAIL: _apply_all,
failure_modes.FailureModes.CONTINUE: _apply_all,
- failure_modes.FailureModes.REMOVE_PATCHES: _remove,
failure_modes.FailureModes.DISABLE_PATCHES: _disable,
failure_modes.FailureModes.BISECT_PATCHES: _test_single,
}
diff --git a/llvm_tools/update_chromeos_llvm_hash.py b/llvm_tools/update_chromeos_llvm_hash.py
index 002fe5fd..bbb5edb3 100755
--- a/llvm_tools/update_chromeos_llvm_hash.py
+++ b/llvm_tools/update_chromeos_llvm_hash.py
@@ -223,7 +223,6 @@ def GetCommandLineArgs():
failure_modes.FailureModes.FAIL.value,
failure_modes.FailureModes.CONTINUE.value,
failure_modes.FailureModes.DISABLE_PATCHES.value,
- failure_modes.FailureModes.REMOVE_PATCHES.value,
],
help="the mode of the patch manager when handling failed patches "
"(default: %(default)s)",
@@ -766,10 +765,6 @@ def UpdatePackagesPatchMetadataFile(
continue_on_failure=mode
== failure_modes.FailureModes.CONTINUE,
)
- elif mode == failure_modes.FailureModes.REMOVE_PATCHES:
- patches_info = patch_utils.remove_old_patches(
- svn_version, src_path, patches_json_fp
- )
elif mode == failure_modes.FailureModes.DISABLE_PATCHES:
patches_info = patch_utils.update_version_ranges(
svn_version, src_path, patches_json_fp
diff --git a/llvm_tools/update_chromeos_llvm_hash_unittest.py b/llvm_tools/update_chromeos_llvm_hash_unittest.py
index dcf6944e..bab1ebb0 100755
--- a/llvm_tools/update_chromeos_llvm_hash_unittest.py
+++ b/llvm_tools/update_chromeos_llvm_hash_unittest.py
@@ -813,7 +813,7 @@ class UpdateLLVMHashTest(unittest.TestCase):
):
packages_to_update = "test-packages/package1,test-libs/lib1"
manifest_packages = "test-libs/lib1,test-libs/lib2"
- failure_mode = failure_modes.FailureModes.REMOVE_PATCHES
+ failure_mode = failure_modes.FailureModes.DISABLE_PATCHES
chromeos_path = Path("/some/path/to/chromeos")
llvm_ver = 435698
git_hash = "1234abcd"