summaryrefslogtreecommitdiff
path: root/buildscripts/task_generation
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/task_generation')
-rw-r--r--buildscripts/task_generation/task_types/multiversion_decorator.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/buildscripts/task_generation/task_types/multiversion_decorator.py b/buildscripts/task_generation/task_types/multiversion_decorator.py
index beb47392828..b0203919c64 100644
--- a/buildscripts/task_generation/task_types/multiversion_decorator.py
+++ b/buildscripts/task_generation/task_types/multiversion_decorator.py
@@ -2,6 +2,7 @@
import copy
from typing import List, Set, Union, Optional
+import structlog
from shrub.v2 import Task, FunctionCall
from shrub.v2.command import ShrubCommand
@@ -9,6 +10,8 @@ from buildscripts.task_generation.constants import DO_MULTIVERSION_SETUP, CONFIG
from buildscripts.task_generation.resmoke_proxy import ResmokeProxyService
from buildscripts.util import taskname
+LOGGER = structlog.get_logger(__name__)
+
class _SuiteFixtureType:
"""Suite fixture types."""
@@ -26,7 +29,7 @@ class MultiversionGenTaskDecorator:
def __init__(self):
"""Initialize multiversion decorator."""
self.resmoke_proxy = ResmokeProxyService()
- self.old_versions = ["last_lts", "last_continuous"]
+ self.old_versions = self._init_old_versions()
def decorate_tasks(self, sub_tasks: Set[Task], params) -> Set[Task]:
"""Make multiversion subtasks based on generated subtasks."""
@@ -51,6 +54,17 @@ class MultiversionGenTaskDecorator:
dependencies=sub_task.dependencies))
return decorated_tasks
+ def _init_old_versions(self) -> List[str]:
+ from buildscripts.resmokelib import multiversionconstants
+ if multiversionconstants.LAST_LTS_FCV == multiversionconstants.LAST_CONTINUOUS_FCV:
+ LOGGER.debug("Last-lts FCV and last-continuous FCV are equal")
+ old_versions = ["last_lts"]
+ else:
+ old_versions = ["last_lts", "last_continuous"]
+ LOGGER.debug("Determined old versions for the multiversion tasks",
+ old_versions=old_versions)
+ return old_versions
+
def _get_suite_fixture_type(self, suite_name: str) -> str:
"""Return suite fixture type."""
source_config = self.resmoke_proxy.read_suite_config(suite_name)