Skip to content

Commit 3a0ddc5

Browse files
lavigneerMongoDB Bot
authored and
MongoDB Bot
committed
SERVER-102195: Add error logging to evergreen api and log exceptions … (#33458)
GitOrigin-RevId: ac81799cd5040d77d4d9779165d9df7843b67e57
1 parent 05efd7d commit 3a0ddc5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

buildscripts/evergreen_activate_gen_tasks.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ def activate_task(expansions: EvgExpansions, evg_api: EvergreenApi) -> None:
7777
try:
7878
evg_api.configure_task(task.task_id, activated=True)
7979
except Exception:
80-
LOGGER.warning(
80+
LOGGER.error(
8181
"Could not activate task",
8282
task_id=task.task_id,
8383
task_name=task.display_name,
84+
exc_info=True,
8485
)
8586
tasks_not_activated.append(task.task_id)
8687

@@ -92,8 +93,11 @@ def activate_task(expansions: EvgExpansions, evg_api: EvergreenApi) -> None:
9293
try:
9394
evg_api.configure_task(task.task_id, activated=True)
9495
except Exception:
95-
LOGGER.warning(
96-
"Could not activate task", task_id=task.task_id, task_name=task.display_name
96+
LOGGER.error(
97+
"Could not activate task",
98+
task_id=task.task_id,
99+
task_name=task.display_name,
100+
exc_info=True,
97101
)
98102
tasks_not_activated.append(task.task_id)
99103
if len(tasks_not_activated) > 0:
@@ -132,7 +136,7 @@ def main(expansion_file: str, evergreen_config: str, verbose: bool) -> None:
132136
"""
133137
enable_logging(verbose)
134138
expansions = EvgExpansions.from_yaml_file(expansion_file)
135-
evg_api = RetryingEvergreenApi.get_api(config_file=evergreen_config)
139+
evg_api = RetryingEvergreenApi.get_api(config_file=evergreen_config, log_on_error=True)
136140

137141
activate_task(expansions, evg_api)
138142

0 commit comments

Comments
 (0)