taskcluster-taskgraph 8.1.0__tar.gz → 8.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {taskcluster-taskgraph-8.1.0/src/taskcluster_taskgraph.egg-info → taskcluster-taskgraph-8.2.0}/PKG-INFO +1 -1
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0/src/taskcluster_taskgraph.egg-info}/PKG-INFO +1 -1
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/__init__.py +1 -1
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/docker.py +7 -5
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/optimize/strategies.py +20 -3
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_optimize_strategies.py +25 -2
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/LICENSE +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/MANIFEST.in +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/README.rst +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/pyproject.toml +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/requirements/base.in +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/requirements/base.txt +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/requirements/dev.in +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/requirements/dev.txt +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/requirements/test.in +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/requirements/test.txt +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/setup.cfg +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/setup.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskcluster_taskgraph.egg-info/SOURCES.txt +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskcluster_taskgraph.egg-info/dependency_links.txt +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskcluster_taskgraph.egg-info/entry_points.txt +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskcluster_taskgraph.egg-info/requires.txt +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskcluster_taskgraph.egg-info/top_level.txt +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/__init__.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/add_new_jobs.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/cancel.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/cancel_all.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/rebuild_cached_tasks.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/registry.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/retrigger.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/util.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/config.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/create.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/decision.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/filter_tasks.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/generator.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/graph.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/loader/__init__.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/loader/default.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/loader/transform.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/main.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/morph.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/optimize/__init__.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/optimize/base.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/parameters.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/run-task/fetch-content +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/run-task/hgrc +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/run-task/robustcheckout.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/run-task/run-task +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/target_tasks.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/task.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/taskgraph.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/__init__.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/base.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/cached_tasks.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/chunking.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/code_review.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/docker_image.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/fetch.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/from_deps.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/notify.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/run/__init__.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/run/common.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/run/index_search.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/run/run_task.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/run/toolchain.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/task.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/task_context.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/__init__.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/archive.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/attributes.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/cached_tasks.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/dependencies.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/docker.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/hash.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/keyed_by.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/memoize.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/parameterization.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/path.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/python_path.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/readonlydict.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/schema.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/set_name.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/shell.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/taskcluster.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/taskgraph.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/templates.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/time.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/treeherder.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/vcs.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/verify.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/workertypes.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/yaml.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_actions_rebuild_cached_tasks.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_actions_registry.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_create.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_decision.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_docker.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_generator.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_graph.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_main.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_morph.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_optimize.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_parameters.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_scripts_fetch_content.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_scripts_run_task.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_target_tasks.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_taskgraph.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transform_chunking.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transform_docker_image.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transform_task_context.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_base.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_cached_tasks.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_fetch.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_from_deps.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_notify.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_run.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_run_run_task.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_run_toolchain.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_task.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_archive.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_attributes.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_cached_tasks.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_dependencies.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_docker.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_parameterization.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_path.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_python_path.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_readonlydict.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_schema.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_taskcluster.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_templates.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_time.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_treeherder.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_vcs.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_verify.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_workertypes.py +0 -0
- {taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_yaml.py +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
4
4
|
|
|
5
|
-
__version__ = "8.
|
|
5
|
+
__version__ = "8.2.0"
|
|
6
6
|
|
|
7
7
|
# Maximum number of dependencies a single task can have
|
|
8
8
|
# https://docs.taskcluster.net/reference/platform/taskcluster-queue/references/api#createTask
|
|
@@ -16,7 +16,10 @@ except ImportError as e:
|
|
|
16
16
|
zstd = e
|
|
17
17
|
|
|
18
18
|
from taskgraph.util import docker
|
|
19
|
-
from taskgraph.util.taskcluster import
|
|
19
|
+
from taskgraph.util.taskcluster import (
|
|
20
|
+
get_artifact_url,
|
|
21
|
+
get_session,
|
|
22
|
+
)
|
|
20
23
|
|
|
21
24
|
DEPLOY_WARNING = """
|
|
22
25
|
*****************************************************************
|
|
@@ -59,10 +62,9 @@ def load_image_by_name(image_name, tag=None):
|
|
|
59
62
|
)
|
|
60
63
|
tasks = load_tasks_for_kind(params, "docker-image")
|
|
61
64
|
task = tasks[f"build-docker-image-{image_name}"]
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
)
|
|
65
|
+
|
|
66
|
+
indexes = task.optimization.get("index-search", [])
|
|
67
|
+
task_id = IndexSearch().should_replace_task(task, {}, None, indexes)
|
|
66
68
|
|
|
67
69
|
if task_id in (True, False):
|
|
68
70
|
print(
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/optimize/strategies.py
RENAMED
|
@@ -3,6 +3,7 @@ from datetime import datetime
|
|
|
3
3
|
|
|
4
4
|
from taskgraph.optimize.base import OptimizationStrategy, register_strategy
|
|
5
5
|
from taskgraph.util.path import match as match_path
|
|
6
|
+
from taskgraph.util.taskcluster import find_task_id, status_task
|
|
6
7
|
|
|
7
8
|
logger = logging.getLogger(__name__)
|
|
8
9
|
|
|
@@ -23,12 +24,28 @@ class IndexSearch(OptimizationStrategy):
|
|
|
23
24
|
|
|
24
25
|
def should_replace_task(self, task, params, deadline, arg):
|
|
25
26
|
"Look for a task with one of the given index paths"
|
|
26
|
-
|
|
27
|
+
batched = False
|
|
28
|
+
# Appease static checker that doesn't understand that this is not needed
|
|
29
|
+
label_to_taskid = {}
|
|
30
|
+
taskid_to_status = {}
|
|
31
|
+
|
|
32
|
+
if isinstance(arg, tuple) and len(arg) == 3:
|
|
33
|
+
# allow for a batched call optimization instead of two queries
|
|
34
|
+
# per index path
|
|
35
|
+
index_paths, label_to_taskid, taskid_to_status = arg
|
|
36
|
+
batched = True
|
|
37
|
+
else:
|
|
38
|
+
index_paths = arg
|
|
27
39
|
|
|
28
40
|
for index_path in index_paths:
|
|
29
41
|
try:
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
if batched:
|
|
43
|
+
task_id = label_to_taskid[index_path]
|
|
44
|
+
status = taskid_to_status[task_id]
|
|
45
|
+
else:
|
|
46
|
+
# 404 is raised as `KeyError` also end up here
|
|
47
|
+
task_id = find_task_id(index_path)
|
|
48
|
+
status = status_task(task_id)
|
|
32
49
|
# status can be `None` if we're in `testing` mode
|
|
33
50
|
# (e.g. test-action-callback)
|
|
34
51
|
if not status or status.get("state") in ("exception", "failed"):
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_optimize_strategies.py
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Any copyright is dedicated to the public domain.
|
|
2
2
|
# http://creativecommons.org/publicdomain/zero/1.0/
|
|
3
3
|
|
|
4
|
+
import os
|
|
4
5
|
from datetime import datetime
|
|
5
6
|
from test.fixtures.gen import make_task
|
|
6
7
|
from time import mktime
|
|
@@ -43,9 +44,29 @@ def params():
|
|
|
43
44
|
),
|
|
44
45
|
),
|
|
45
46
|
)
|
|
46
|
-
def test_index_search(state, expires, expected):
|
|
47
|
+
def test_index_search(responses, params, state, expires, expected):
|
|
47
48
|
taskid = "abc"
|
|
48
49
|
index_path = "foo.bar.latest"
|
|
50
|
+
|
|
51
|
+
responses.add(
|
|
52
|
+
responses.GET,
|
|
53
|
+
f"{os.environ['TASKCLUSTER_ROOT_URL']}/api/index/v1/task/{index_path}",
|
|
54
|
+
json={"taskId": taskid},
|
|
55
|
+
status=200,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
responses.add(
|
|
59
|
+
responses.GET,
|
|
60
|
+
f"{os.environ['TASKCLUSTER_ROOT_URL']}/api/queue/v1/task/{taskid}/status",
|
|
61
|
+
json={
|
|
62
|
+
"status": {
|
|
63
|
+
"state": state,
|
|
64
|
+
"expires": expires,
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
status=200,
|
|
68
|
+
)
|
|
69
|
+
|
|
49
70
|
label_to_taskid = {index_path: taskid}
|
|
50
71
|
taskid_to_status = {
|
|
51
72
|
taskid: {
|
|
@@ -58,10 +79,12 @@ def test_index_search(state, expires, expected):
|
|
|
58
79
|
deadline = "2021-06-07T19:03:20.482Z"
|
|
59
80
|
assert (
|
|
60
81
|
opt.should_replace_task(
|
|
61
|
-
{}, params, deadline, (
|
|
82
|
+
{}, params, deadline, ([index_path], label_to_taskid, taskid_to_status)
|
|
62
83
|
)
|
|
63
84
|
== expected
|
|
64
85
|
)
|
|
86
|
+
# test the non-batched variant as well
|
|
87
|
+
assert opt.should_replace_task({}, params, deadline, [index_path]) == expected
|
|
65
88
|
|
|
66
89
|
|
|
67
90
|
@pytest.mark.parametrize(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/__init__.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/add_new_jobs.py
RENAMED
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/cancel_all.py
RENAMED
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/registry.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/actions/retrigger.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/loader/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/loader/transform.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/optimize/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/run-task/fetch-content
RENAMED
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/run-task/robustcheckout.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/__init__.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/base.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/cached_tasks.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/chunking.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/code_review.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/docker_image.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/fetch.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/from_deps.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/notify.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/run/__init__.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/run/common.py
RENAMED
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/run/run_task.py
RENAMED
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/task.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/transforms/task_context.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/attributes.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/cached_tasks.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/parameterization.py
RENAMED
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/python_path.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/readonlydict.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/taskcluster.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/treeherder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/src/taskgraph/util/workertypes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_scripts_fetch_content.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transform_docker_image.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transform_task_context.py
RENAMED
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_cached_tasks.py
RENAMED
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_from_deps.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_run_run_task.py
RENAMED
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_transforms_run_toolchain.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskcluster-taskgraph-8.1.0 → taskcluster-taskgraph-8.2.0}/test/test_util_parameterization.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|