mozilla-taskgraph 3.4.2__tar.gz → 4.0.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.
Files changed (67) hide show
  1. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/CHANGELOG.md +10 -0
  2. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/PKG-INFO +3 -4
  3. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/pyproject.toml +3 -4
  4. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/transforms/replicate.py +3 -3
  5. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/kinds/docker-image/kind.yml +1 -1
  6. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/kinds/test/kind.yml +1 -1
  7. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/actions/test_release_promotion.py +7 -7
  8. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/conftest.py +8 -0
  9. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/test_register.py +0 -5
  10. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/test_worker_types.py +3 -3
  11. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/transforms/test_replicate.py +13 -11
  12. mozilla_taskgraph-4.0.0/uv.lock +1840 -0
  13. mozilla_taskgraph-3.4.2/uv.lock +0 -1171
  14. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/.codespell-ignore-words.txt +0 -0
  15. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/.github/CODEOWNERS +0 -0
  16. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/.github/workflows/pre-commit-autoupdate.yml +0 -0
  17. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/.github/workflows/pre-commit.yml +0 -0
  18. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/.github/workflows/pypi-publish.yml +0 -0
  19. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/.gitignore +0 -0
  20. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/.pre-commit-config.yaml +0 -0
  21. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/.readthedocs.yml +0 -0
  22. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/.taskcluster.yml +0 -0
  23. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/.yamllint +0 -0
  24. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/CODE_OF_CONDUCT.md +0 -0
  25. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/CONTRIBUTING.md +0 -0
  26. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/LICENSE +0 -0
  27. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/Makefile +0 -0
  28. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/README.md +0 -0
  29. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/docs/actions/index.rst +0 -0
  30. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/docs/actions/release-promotion.rst +0 -0
  31. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/docs/conf.py +0 -0
  32. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/docs/index.rst +0 -0
  33. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/docs/transforms/index.rst +0 -0
  34. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/docs/transforms/scriptworker/index.rst +0 -0
  35. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/docs/transforms/scriptworker/release_artifacts.rst +0 -0
  36. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/docs/transforms/scriptworker/ship-it.rst +0 -0
  37. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/__init__.py +0 -0
  38. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/actions/__init__.py +0 -0
  39. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/actions/release_promotion.py +0 -0
  40. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/config.py +0 -0
  41. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/transforms/__init__.py +0 -0
  42. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/transforms/scriptworker/__init__.py +0 -0
  43. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/transforms/scriptworker/release_artifacts.py +0 -0
  44. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/transforms/scriptworker/shipit/__init__.py +0 -0
  45. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/transforms/scriptworker/shipit/mark_as_shipped.py +0 -0
  46. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/util/signed_artifacts.py +0 -0
  47. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/version.py +0 -0
  48. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/src/mozilla_taskgraph/worker_types.py +0 -0
  49. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/config.yml +0 -0
  50. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/docker/fetch/Dockerfile +0 -0
  51. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/docker/fetch/REGISTRY +0 -0
  52. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/docker/python/Dockerfile +0 -0
  53. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/kinds/check/kind.yml +0 -0
  54. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/kinds/codecov/kind.yml +0 -0
  55. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/kinds/fetch/kind.yml +0 -0
  56. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/kinds/release-promotion-dummy/kind.yml +0 -0
  57. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/mt_taskgraph/target_tasks.py +0 -0
  58. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/mt_taskgraph/transforms/test.py +0 -0
  59. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/taskcluster/scripts/codecov-upload.py +0 -0
  60. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/__init__.py +0 -0
  61. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/actions/__init__.py +0 -0
  62. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/data/taskcluster/config.yml +0 -0
  63. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/data/testver.py +0 -0
  64. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/test_version.py +0 -0
  65. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/transforms/test_scriptworker_release_artifacts.py +0 -0
  66. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/transforms/test_scriptworker_shipit.py +0 -0
  67. {mozilla_taskgraph-3.4.2 → mozilla_taskgraph-4.0.0}/test/util/test_signed_artifacts.py +0 -0
@@ -1,3 +1,13 @@
1
+ ## 4.0.0 (2025-10-17)
2
+
3
+ ### Fix
4
+
5
+ - declare support for Taskgraph 17.x
6
+ - added support for taskcluster-taskgraph v16.2.1 (#117)
7
+
8
+
9
+ - drop support for Python 3.8
10
+
1
11
  ## 3.4.2 (2025-10-08)
2
12
 
3
13
  ## Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mozilla-taskgraph
3
- Version: 3.4.2
3
+ Version: 4.0.0
4
4
  Summary: Mozilla specific transforms and utilities for Taskgraph
5
5
  Project-URL: Repository, https://github.com/mozilla-releng/mozilla-taskgraph
6
6
  Project-URL: Issues, https://github.com/mozilla-releng/mozilla-taskgraph/issues
@@ -9,14 +9,13 @@ License-File: LICENSE
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Environment :: Console
11
11
  Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
12
- Classifier: Programming Language :: Python :: 3.8
13
12
  Classifier: Programming Language :: Python :: 3.9
14
13
  Classifier: Programming Language :: Python :: 3.10
15
14
  Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
17
16
  Classifier: Topic :: Software Development
18
- Requires-Python: >=3.8
19
- Requires-Dist: taskcluster-taskgraph<17,>=11
17
+ Requires-Python: >=3.9
18
+ Requires-Dist: taskcluster-taskgraph<18,>=16.2.1
20
19
  Description-Content-Type: text/markdown
21
20
 
22
21
  [![Task Status](https://firefox-ci-tc.services.mozilla.com/api/github/v1/repository/mozilla-releng/mozilla-taskgraph/main/badge.svg)](https://firefox-ci-tc.services.mozilla.com/api/github/v1/repository/mozilla-releng/mozilla-taskgraph/main/latest)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mozilla-taskgraph"
3
- version = "3.4.2"
3
+ version = "4.0.0"
4
4
  description = "Mozilla specific transforms and utilities for Taskgraph"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -10,16 +10,15 @@ classifiers = [
10
10
  "Development Status :: 4 - Beta",
11
11
  "Environment :: Console",
12
12
  "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
13
- "Programming Language :: Python :: 3.8",
14
13
  "Programming Language :: Python :: 3.9",
15
14
  "Programming Language :: Python :: 3.10",
16
15
  "Programming Language :: Python :: 3.11",
17
16
  "Programming Language :: Python :: 3.12",
18
17
  "Topic :: Software Development",
19
18
  ]
20
- requires-python = ">=3.8"
19
+ requires-python = ">=3.9"
21
20
  dependencies = [
22
- "taskcluster-taskgraph>=11,<17",
21
+ "taskcluster-taskgraph>=16.2.1,<18",
23
22
  ]
24
23
 
25
24
  [project.urls]
@@ -8,7 +8,7 @@ import os
8
8
  import re
9
9
  from textwrap import dedent
10
10
 
11
- from requests.exceptions import HTTPError
11
+ from taskcluster.exceptions import TaskclusterRestFailure
12
12
  from taskgraph.transforms.base import TransformSequence
13
13
  from taskgraph.util.attributes import attrmatch
14
14
  from taskgraph.util.schema import Schema
@@ -102,8 +102,8 @@ def resolve_targets(config, tasks):
102
102
  # we have a decision task, add all tasks from task-graph.json
103
103
  result = get_artifact(task_id, "public/task-graph.json").values()
104
104
  task_defs.extend(result)
105
- except HTTPError as e:
106
- if e.response.status_code != 404:
105
+ except TaskclusterRestFailure as e:
106
+ if e.status_code != 404:
107
107
  raise
108
108
 
109
109
  # we have a regular task, just yield its definition and move on
@@ -10,4 +10,4 @@ tasks:
10
10
  fetch: {}
11
11
  python:
12
12
  args:
13
- PYTHON_VERSIONS: "3.12 3.11 3.10 3.9 3.8"
13
+ PYTHON_VERSIONS: "3.12 3.11 3.10 3.9"
@@ -21,7 +21,7 @@ tasks:
21
21
  description: "Run Python unit tests."
22
22
  attributes:
23
23
  artifact_prefix: public
24
- python-versions: ["3.12", "3.11", "3.10", "3.9", "3.8"]
24
+ python-versions: ["3.12", "3.11", "3.10", "3.9"]
25
25
  run:
26
26
  command: >-
27
27
  uv run coverage run --data-file $MOZ_ARTIFACT_DIR/coverage --context=py$UV_PYTHON -m pytest -vv
@@ -3,11 +3,13 @@ from itertools import count
3
3
 
4
4
  import pytest
5
5
  import taskcluster_urls as liburl
6
- from taskgraph.util.taskcluster import get_artifact_url
7
6
 
8
7
  from mozilla_taskgraph.actions import enable_action
9
8
 
10
- from ..conftest import make_graph, make_task
9
+ from ..conftest import (
10
+ make_graph,
11
+ make_task,
12
+ )
11
13
 
12
14
 
13
15
  @pytest.fixture(scope="session", autouse=True)
@@ -49,9 +51,7 @@ def setup(responses, parameters):
49
51
  # Only the parameters from the first previous graph is downloaded.
50
52
  responses.add(
51
53
  method="GET",
52
- url=get_artifact_url(
53
- list(previous_graphs.keys())[0], "public/parameters.yml"
54
- ),
54
+ url=f"{tc_url}/api/queue/v1/task/{list(previous_graphs.keys())[0]}/artifacts/public%2Fparameters.yml",
55
55
  json=parameters,
56
56
  )
57
57
 
@@ -59,13 +59,13 @@ def setup(responses, parameters):
59
59
  for decision_id, full_task_graph in previous_graphs.items():
60
60
  responses.add(
61
61
  method="GET",
62
- url=get_artifact_url(decision_id, "public/full-task-graph.json"),
62
+ url=f"{tc_url}/api/queue/v1/task/{decision_id}/artifacts/public%2Ffull-task-graph.json",
63
63
  json=full_task_graph.to_json(),
64
64
  )
65
65
  label_to_taskid = {label: int(next(tid)) for label in full_task_graph.tasks}
66
66
  responses.add(
67
67
  method="GET",
68
- url=get_artifact_url(decision_id, "public/label-to-taskid.json"),
68
+ url=f"{tc_url}/api/queue/v1/task/{decision_id}/artifacts/public%2Flabel-to-taskid.json",
69
69
  json=label_to_taskid,
70
70
  )
71
71
 
@@ -1,3 +1,4 @@
1
+ import os
1
2
  from pathlib import Path
2
3
 
3
4
  import pytest
@@ -23,6 +24,13 @@ def set_taskcluster_url(session_mocker):
23
24
  "os.environ", {"TASKCLUSTER_ROOT_URL": liburl.test_root_url()}
24
25
  )
25
26
 
27
+ # The Taskcluster Proxy URL is cleared to ensure the test environment
28
+ # uses the root url instead of the proxy url as with the current
29
+ # implementation of get_artifact we default to using
30
+ # the proxy url if it is present in the environment
31
+ if "TASKCLUSTER_PROXY_URL" in os.environ:
32
+ del os.environ["TASKCLUSTER_PROXY_URL"]
33
+
26
34
 
27
35
  @pytest.fixture
28
36
  def responses():
@@ -27,11 +27,6 @@ def test_payload_builders(graph_config):
27
27
  does_not_raise(),
28
28
  id="shipit_valid",
29
29
  ),
30
- pytest.param(
31
- {"shipit": {"product": "foo", "extra": "bar"}},
32
- pytest.raises(Exception),
33
- id="shipit_invalid",
34
- ),
35
30
  ),
36
31
  )
37
32
  def test_graph_config(make_graph_config, extra_config, expectation):
@@ -1,6 +1,6 @@
1
1
  import inspect
2
2
  from pprint import pprint
3
- from typing import Dict, Optional, Tuple
3
+ from typing import Optional
4
4
 
5
5
  import pytest
6
6
  from taskgraph.transforms.task import payload_builders
@@ -18,9 +18,9 @@ def build_payload(make_graph_config, make_transform_config, parameters):
18
18
  def inner(
19
19
  name: str,
20
20
  worker: dict,
21
- extra_params: Optional[Dict] = None,
21
+ extra_params: Optional[dict] = None,
22
22
  raises: Optional[Exception] = None,
23
- ) -> Optional[Tuple[Dict, Dict]]:
23
+ ) -> Optional[tuple[dict, dict]]:
24
24
  extra_params = extra_params or {}
25
25
 
26
26
  worker.setdefault("implementation", name)
@@ -1,9 +1,8 @@
1
1
  from itertools import count
2
2
  from pprint import pprint
3
- from unittest.mock import Mock
4
3
 
5
4
  import pytest
6
- from requests import HTTPError
5
+ from taskcluster.exceptions import TaskclusterRestFailure
7
6
  from taskgraph.util.templates import merge
8
7
 
9
8
  from mozilla_taskgraph.transforms.replicate import transforms as replicate_transforms
@@ -139,11 +138,12 @@ def test_requests_error(responses, run_replicate):
139
138
  },
140
139
  }
141
140
  responses.get(
142
- f"{TC_ROOT_URL}/api/queue/v1/task/{task_id}/artifacts/public/task-graph.json",
143
- body=HTTPError("Artifact not found!", response=Mock(status_code=403)),
141
+ f"{TC_ROOT_URL}/api/queue/v1/task/{task_id}/artifacts/public%2Ftask-graph.json",
142
+ json={"message": "Forbidden"},
143
+ status=403,
144
144
  )
145
145
 
146
- with pytest.raises(HTTPError):
146
+ with pytest.raises(TaskclusterRestFailure):
147
147
  run_replicate(task)
148
148
 
149
149
 
@@ -162,8 +162,9 @@ def test_task_id(responses, run_replicate):
162
162
  expected = get_expected(prefix, task_def)[0]
163
163
 
164
164
  responses.get(
165
- f"{TC_ROOT_URL}/api/queue/v1/task/{task_id}/artifacts/public/task-graph.json",
166
- body=HTTPError("Artifact not found!", response=Mock(status_code=404)),
165
+ f"{TC_ROOT_URL}/api/queue/v1/task/{task_id}/artifacts/public%2Ftask-graph.json",
166
+ json={"message": "Artifact not found"},
167
+ status=404,
167
168
  )
168
169
  responses.get(f"{TC_ROOT_URL}/api/queue/v1/task/{task_id}", json=task_def)
169
170
 
@@ -187,8 +188,9 @@ def test_index_path(responses, run_replicate):
187
188
  f"{TC_ROOT_URL}/api/index/v1/task/{index_path}", json={"taskId": task_id}
188
189
  )
189
190
  responses.get(
190
- f"{TC_ROOT_URL}/api/queue/v1/task/{task_id}/artifacts/public/task-graph.json",
191
- body=HTTPError("Artifact not found!", response=Mock(status_code=404)),
191
+ f"{TC_ROOT_URL}/api/queue/v1/task/{task_id}/artifacts/public%2Ftask-graph.json",
192
+ json={"message": "Artifact not found"},
193
+ status=404,
192
194
  )
193
195
  responses.get(f"{TC_ROOT_URL}/api/queue/v1/task/{index_path}", json=task_def)
194
196
 
@@ -213,7 +215,7 @@ def test_decision_task(responses, run_replicate):
213
215
 
214
216
  counter = count()
215
217
  responses.get(
216
- f"{TC_ROOT_URL}/api/queue/v1/task/{task_id}/artifacts/public/task-graph.json",
218
+ f"{TC_ROOT_URL}/api/queue/v1/task/{task_id}/artifacts/public%2Ftask-graph.json",
217
219
  json={next(counter): task_def for task_def in task_defs},
218
220
  )
219
221
  result = run_replicate(task)
@@ -268,7 +270,7 @@ def test_filtered_out(responses, run_replicate, target_def):
268
270
 
269
271
  counter = count()
270
272
  responses.get(
271
- f"{TC_ROOT_URL}/api/queue/v1/task/{task_id}/artifacts/public/task-graph.json",
273
+ f"{TC_ROOT_URL}/api/queue/v1/task/{task_id}/artifacts/public%2Ftask-graph.json",
272
274
  json={next(counter): task_def for task_def in task_defs},
273
275
  )
274
276
  result = run_replicate(task)