SERVER-103958 Add ability to skip activate task (#35138)

GitOrigin-RevId: f7396619810137a067e6ae47934ede29b56c4e42
This commit is contained in:
Andrew Bradshaw 2025-04-17 09:16:03 -07:00 committed by MongoDB Bot
parent 0648109edc
commit 224322ee2a
4 changed files with 9 additions and 2 deletions

View File

@ -2837,6 +2837,7 @@ functions:
- "evergreen/activate_task.py" - "evergreen/activate_task.py"
- "${task_to_activate}" - "${task_to_activate}"
- "${skip_for_patch_author}" - "${skip_for_patch_author}"
- "${skip_activate_task}"
"gen supplementary data": "gen supplementary data":
command: subprocess.exec command: subprocess.exec

View File

@ -117,6 +117,7 @@ tasks:
vars: vars:
task_to_activate: ${archive_dist_test_debug_task_name|archive_dist_test_debug} task_to_activate: ${archive_dist_test_debug_task_name|archive_dist_test_debug}
skip_for_patch_author: sys-perf-user skip_for_patch_author: sys-perf-user
skip_activate_task: ${skip_archive_dist_test_debug_activate|False}
- func: "bazel compile" - func: "bazel compile"
vars: vars:
targets: >- targets: >-

View File

@ -82,6 +82,7 @@ buildvariants:
content_type: application/zip content_type: application/zip
bazel_compile_flags: >- bazel_compile_flags: >-
--define=MONGO_DISTMOD=windows --define=MONGO_DISTMOD=windows
skip_archive_dist_test_debug_activate: True
python: "/cygdrive/c/python/python310/python.exe" python: "/cygdrive/c/python/python310/python.exe"
ext: zip ext: zip
multiversion_platform: windows multiversion_platform: windows

View File

@ -9,13 +9,17 @@ from buildscripts.resmokelib.utils import evergreen_conn
from buildscripts.util.read_config import read_config_file from buildscripts.util.read_config import read_config_file
def main(task_name: str, skip_for_patch_author: Annotated[Optional[str], typer.Argument()] = None): def main(
task_name: str,
skip_for_patch_author: Annotated[Optional[str], typer.Argument()] = None,
skip_activate_task: Annotated[Optional[bool], typer.Argument()] = False,
):
expansions_file = "../expansions.yml" expansions_file = "../expansions.yml"
expansions = read_config_file(expansions_file) expansions = read_config_file(expansions_file)
evg_api = evergreen_conn.get_evergreen_api() evg_api = evergreen_conn.get_evergreen_api()
# Skip activation if the patch author is the excluded user # Skip activation if the patch author is the excluded user
if expansions.get("author") == skip_for_patch_author: if expansions.get("author") == skip_for_patch_author or skip_activate_task:
return return
variant_id = expansions.get("build_id") variant_id = expansions.get("build_id")