taskcluster-taskgraph 4.2.0__tar.gz → 5.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 (129) hide show
  1. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/MANIFEST.in +0 -1
  2. {taskcluster-taskgraph-4.2.0/src/taskcluster_taskgraph.egg-info → taskcluster-taskgraph-5.0.0}/PKG-INFO +1 -7
  3. taskcluster-taskgraph-5.0.0/pyproject.toml +31 -0
  4. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/requirements/base.in +1 -0
  5. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/requirements/base.txt +103 -2
  6. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/requirements/test.txt +0 -4
  7. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/setup.py +6 -5
  8. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0/src/taskcluster_taskgraph.egg-info}/PKG-INFO +1 -7
  9. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskcluster_taskgraph.egg-info/SOURCES.txt +0 -1
  10. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskcluster_taskgraph.egg-info/entry_points.txt +0 -1
  11. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskcluster_taskgraph.egg-info/requires.txt +2 -1
  12. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/__init__.py +1 -0
  13. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/actions/cancel_all.py +1 -1
  14. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/actions/util.py +1 -1
  15. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/create.py +1 -1
  16. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/decision.py +3 -1
  17. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/main.py +78 -3
  18. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/run-task/fetch-content +1 -1
  19. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/run-task/run-task +7 -5
  20. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/task.py +4 -4
  21. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/path.py +2 -7
  22. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_decision.py +50 -0
  23. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_main.py +72 -7
  24. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_parameters.py +1 -4
  25. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_vcs.py +4 -136
  26. taskcluster-taskgraph-4.2.0/pyproject.toml +0 -16
  27. taskcluster-taskgraph-4.2.0/version.txt +0 -1
  28. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/LICENSE +0 -0
  29. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/README.rst +0 -0
  30. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/requirements/dev.in +0 -0
  31. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/requirements/dev.txt +0 -0
  32. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/requirements/test.in +0 -0
  33. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/setup.cfg +0 -0
  34. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskcluster_taskgraph.egg-info/dependency_links.txt +0 -0
  35. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskcluster_taskgraph.egg-info/top_level.txt +0 -0
  36. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/actions/__init__.py +0 -0
  37. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/actions/add_new_jobs.py +0 -0
  38. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/actions/cancel.py +0 -0
  39. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/actions/rebuild_cached_tasks.py +0 -0
  40. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/actions/registry.py +0 -0
  41. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/actions/retrigger.py +0 -0
  42. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/config.py +0 -0
  43. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/docker.py +0 -0
  44. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/files_changed.py +0 -0
  45. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/filter_tasks.py +0 -0
  46. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/generator.py +0 -0
  47. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/graph.py +0 -0
  48. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/loader/__init__.py +0 -0
  49. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/loader/transform.py +0 -0
  50. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/morph.py +0 -0
  51. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/optimize/__init__.py +0 -0
  52. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/optimize/base.py +0 -0
  53. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/optimize/strategies.py +0 -0
  54. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/parameters.py +0 -0
  55. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/run-task/hgrc +0 -0
  56. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/run-task/robustcheckout.py +0 -0
  57. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/target_tasks.py +0 -0
  58. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/task.py +0 -0
  59. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/taskgraph.py +0 -0
  60. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/__init__.py +0 -0
  61. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/base.py +0 -0
  62. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/cached_tasks.py +0 -0
  63. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/code_review.py +0 -0
  64. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/docker_image.py +0 -0
  65. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/fetch.py +0 -0
  66. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/job/__init__.py +0 -0
  67. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/job/common.py +0 -0
  68. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/job/index_search.py +0 -0
  69. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/job/run_task.py +0 -0
  70. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/job/toolchain.py +0 -0
  71. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/transforms/notify.py +0 -0
  72. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/__init__.py +0 -0
  73. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/archive.py +0 -0
  74. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/attributes.py +0 -0
  75. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/cached_tasks.py +0 -0
  76. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/decision.py +0 -0
  77. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/docker.py +0 -0
  78. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/hash.py +0 -0
  79. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/keyed_by.py +0 -0
  80. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/memoize.py +0 -0
  81. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/parameterization.py +0 -0
  82. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/python_path.py +0 -0
  83. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/readonlydict.py +0 -0
  84. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/schema.py +0 -0
  85. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/shell.py +0 -0
  86. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/taskcluster.py +0 -0
  87. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/taskgraph.py +0 -0
  88. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/templates.py +0 -0
  89. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/time.py +0 -0
  90. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/treeherder.py +0 -0
  91. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/vcs.py +0 -0
  92. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/verify.py +0 -0
  93. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/workertypes.py +0 -0
  94. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/src/taskgraph/util/yaml.py +0 -0
  95. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_actions_rebuild_cached_tasks.py +0 -0
  96. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_actions_registry.py +0 -0
  97. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_create.py +0 -0
  98. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_files_changed.py +0 -0
  99. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_generator.py +0 -0
  100. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_graph.py +0 -0
  101. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_morph.py +0 -0
  102. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_optimize.py +0 -0
  103. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_optimize_strategies.py +0 -0
  104. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_scripts_fetch_content.py +0 -0
  105. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_scripts_run_task.py +0 -0
  106. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_target_tasks.py +0 -0
  107. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_taskgraph.py +0 -0
  108. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_transforms_base.py +0 -0
  109. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_transforms_fetch.py +0 -0
  110. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_transforms_job.py +0 -0
  111. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_transforms_job_run_task.py +0 -0
  112. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_transforms_job_toolchain.py +0 -0
  113. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_transforms_notify.py +0 -0
  114. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_transforms_task.py +0 -0
  115. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_attributes.py +0 -0
  116. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_docker.py +0 -0
  117. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_memoize.py +0 -0
  118. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_parameterization.py +0 -0
  119. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_path.py +0 -0
  120. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_python_path.py +0 -0
  121. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_readonlydict.py +0 -0
  122. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_schema.py +0 -0
  123. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_taskcluster.py +0 -0
  124. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_templates.py +0 -0
  125. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_time.py +0 -0
  126. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_treeherder.py +0 -0
  127. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_verify.py +0 -0
  128. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_workertypes.py +0 -0
  129. {taskcluster-taskgraph-4.2.0 → taskcluster-taskgraph-5.0.0}/test/test_util_yaml.py +0 -0
@@ -4,4 +4,3 @@ include requirements/test.in
4
4
  include requirements/test.txt
5
5
  include requirements/dev.in
6
6
  include requirements/dev.txt
7
- include version.txt
@@ -1,14 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: taskcluster-taskgraph
3
- Version: 4.2.0
3
+ Version: 5.0.0
4
4
  Summary: Build taskcluster taskgraphs
5
5
  Home-page: https://github.com/taskcluster/taskgraph
6
- License: UNKNOWN
7
- Platform: UNKNOWN
8
6
  Classifier: Development Status :: 5 - Production/Stable
9
7
  Classifier: Environment :: Console
10
8
  Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
11
- Classifier: Programming Language :: Python :: 3.6
12
9
  Classifier: Programming Language :: Python :: 3.7
13
10
  Classifier: Programming Language :: Python :: 3.8
14
11
  Classifier: Programming Language :: Python :: 3.9
@@ -17,6 +14,3 @@ Classifier: Programming Language :: Python :: 3.11
17
14
  Classifier: Topic :: Software Development
18
15
  Provides-Extra: load-image
19
16
  License-File: LICENSE
20
-
21
- UNKNOWN
22
-
@@ -0,0 +1,31 @@
1
+ [tool.black]
2
+ line-length = 88
3
+ extend-exclude = """(\
4
+ taskcluster/scripts/external_tools)\
5
+ """
6
+
7
+ [tool.pytest.ini_options]
8
+ xfail_strict = true
9
+
10
+ [tool.coverage.run]
11
+ parallel = true
12
+ branch = true
13
+ source = ["src/taskgraph/", "taskgraph", "src/taskgraph/run-task/"]
14
+
15
+ [tool.ruff]
16
+ select = [
17
+ "E", "W", # pycodestyle
18
+ "F", # pyflakes
19
+ "I", # isort
20
+ "PLC", "PLE", # pylint
21
+ "UP", # pyupgrade
22
+ ]
23
+ ignore = [
24
+ "E402",
25
+ "E501", # let black handle line-length
26
+ "E741",
27
+ ]
28
+ target-version = "py37"
29
+
30
+ [tool.ruff.isort]
31
+ known-first-party = ["taskgraph"]
@@ -1,5 +1,6 @@
1
1
  appdirs>=1.4
2
2
  attrs>=19.1.0
3
+ cookiecutter~=2.1
3
4
  json-e>=2.7
4
5
  mozilla-repo-urls
5
6
  PyYAML>=5.4
@@ -1,4 +1,4 @@
1
- # SHA1:c6a8ad3c4813e559ba8c8588097a33743e8da1a4
1
+ # SHA1:a199a11be56ce347d10dd1fce8de55752b42b141
2
2
  #
3
3
  # This file is autogenerated by pip-compile-multi
4
4
  # To update, run:
@@ -9,14 +9,26 @@ appdirs==1.4.4 \
9
9
  --hash=sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41 \
10
10
  --hash=sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128
11
11
  # via -r requirements/base.in
12
+ arrow==1.2.3 \
13
+ --hash=sha256:3934b30ca1b9f292376d9db15b19446088d12ec58629bc3f0da28fd55fb633a1 \
14
+ --hash=sha256:5a49ab92e3b7b71d96cd6bfcc4df14efefc9dfa96ea19045815914a6ab6b1fe2
15
+ # via jinja2-time
12
16
  attrs==22.2.0 \
13
17
  --hash=sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836 \
14
18
  --hash=sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99
15
19
  # via -r requirements/base.in
20
+ binaryornot==0.4.4 \
21
+ --hash=sha256:359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061 \
22
+ --hash=sha256:b8b71173c917bddcd2c16070412e369c3ed7f0528926f70cac18a6c97fd563e4
23
+ # via cookiecutter
16
24
  certifi==2022.12.7 \
17
25
  --hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \
18
26
  --hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18
19
27
  # via requests
28
+ chardet==5.1.0 \
29
+ --hash=sha256:0d62712b956bc154f85fb0a266e2a3c5913c2967e00348701b32411d6def31e5 \
30
+ --hash=sha256:362777fb014af596ad31334fde1e8c327dfdb076e1960d1694662d46a6917ab9
31
+ # via binaryornot
20
32
  charset-normalizer==3.0.1 \
21
33
  --hash=sha256:00d3ffdaafe92a5dc603cb9bd5111aaa36dfa187c8285c543be562e61b755f6b \
22
34
  --hash=sha256:024e606be3ed92216e2b6952ed859d86b4cfa52cd5bc5f050e7dc28f9b43ec42 \
@@ -107,6 +119,14 @@ charset-normalizer==3.0.1 \
107
119
  --hash=sha256:f9d0c5c045a3ca9bedfc35dca8526798eb91a07aa7a2c0fee134c6c6f321cbd7 \
108
120
  --hash=sha256:ff6f3db31555657f3163b15a6b7c6938d08df7adbfc9dd13d9d19edad678f1e8
109
121
  # via requests
122
+ click==8.1.3 \
123
+ --hash=sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e \
124
+ --hash=sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48
125
+ # via cookiecutter
126
+ cookiecutter==2.1.1 \
127
+ --hash=sha256:9f3ab027cec4f70916e28f03470bdb41e637a3ad354b4d65c765d93aad160022 \
128
+ --hash=sha256:f3982be8d9c53dac1261864013fdec7f83afd2e42ede6f6dd069c5e149c540d5
129
+ # via -r requirements/base.in
110
130
  giturlparse==0.10.0 \
111
131
  --hash=sha256:04ba1a3a099c3093fa8d24a422913c6a9b2c2cd22bcffc939cf72e3e98f672d7 \
112
132
  --hash=sha256:2595ab291d30717cda8474b874c9fd509f1b9802ad7f6968c36a45e4b13eb337
@@ -115,14 +135,84 @@ idna==3.4 \
115
135
  --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \
116
136
  --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2
117
137
  # via requests
138
+ jinja2==3.1.2 \
139
+ --hash=sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852 \
140
+ --hash=sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61
141
+ # via
142
+ # cookiecutter
143
+ # jinja2-time
144
+ jinja2-time==0.2.0 \
145
+ --hash=sha256:d14eaa4d315e7688daa4969f616f226614350c48730bfa1692d2caebd8c90d40 \
146
+ --hash=sha256:d3eab6605e3ec8b7a0863df09cc1d23714908fa61aa6986a845c20ba488b4efa
147
+ # via cookiecutter
118
148
  json-e==4.5.0 \
119
149
  --hash=sha256:618a94aecc8b8bc7733d6cd0ee7b676e45675566625a38958aa8b30379d9758f \
120
150
  --hash=sha256:e733ce77b4acbbc2c48211057f8cb5af45999e6be4ce0f07585c5580df45826e
121
151
  # via -r requirements/base.in
152
+ markupsafe==2.1.2 \
153
+ --hash=sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed \
154
+ --hash=sha256:085fd3201e7b12809f9e6e9bc1e5c96a368c8523fad5afb02afe3c051ae4afcc \
155
+ --hash=sha256:090376d812fb6ac5f171e5938e82e7f2d7adc2b629101cec0db8b267815c85e2 \
156
+ --hash=sha256:0b462104ba25f1ac006fdab8b6a01ebbfbce9ed37fd37fd4acd70c67c973e460 \
157
+ --hash=sha256:137678c63c977754abe9086a3ec011e8fd985ab90631145dfb9294ad09c102a7 \
158
+ --hash=sha256:1bea30e9bf331f3fef67e0a3877b2288593c98a21ccb2cf29b74c581a4eb3af0 \
159
+ --hash=sha256:22152d00bf4a9c7c83960521fc558f55a1adbc0631fbb00a9471e097b19d72e1 \
160
+ --hash=sha256:22731d79ed2eb25059ae3df1dfc9cb1546691cc41f4e3130fe6bfbc3ecbbecfa \
161
+ --hash=sha256:2298c859cfc5463f1b64bd55cb3e602528db6fa0f3cfd568d3605c50678f8f03 \
162
+ --hash=sha256:28057e985dace2f478e042eaa15606c7efccb700797660629da387eb289b9323 \
163
+ --hash=sha256:2e7821bffe00aa6bd07a23913b7f4e01328c3d5cc0b40b36c0bd81d362faeb65 \
164
+ --hash=sha256:2ec4f2d48ae59bbb9d1f9d7efb9236ab81429a764dedca114f5fdabbc3788013 \
165
+ --hash=sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036 \
166
+ --hash=sha256:40627dcf047dadb22cd25ea7ecfe9cbf3bbbad0482ee5920b582f3809c97654f \
167
+ --hash=sha256:40dfd3fefbef579ee058f139733ac336312663c6706d1163b82b3003fb1925c4 \
168
+ --hash=sha256:4cf06cdc1dda95223e9d2d3c58d3b178aa5dacb35ee7e3bbac10e4e1faacb419 \
169
+ --hash=sha256:50c42830a633fa0cf9e7d27664637532791bfc31c731a87b202d2d8ac40c3ea2 \
170
+ --hash=sha256:55f44b440d491028addb3b88f72207d71eeebfb7b5dbf0643f7c023ae1fba619 \
171
+ --hash=sha256:608e7073dfa9e38a85d38474c082d4281f4ce276ac0010224eaba11e929dd53a \
172
+ --hash=sha256:63ba06c9941e46fa389d389644e2d8225e0e3e5ebcc4ff1ea8506dce646f8c8a \
173
+ --hash=sha256:65608c35bfb8a76763f37036547f7adfd09270fbdbf96608be2bead319728fcd \
174
+ --hash=sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7 \
175
+ --hash=sha256:6d6607f98fcf17e534162f0709aaad3ab7a96032723d8ac8750ffe17ae5a0666 \
176
+ --hash=sha256:7313ce6a199651c4ed9d7e4cfb4aa56fe923b1adf9af3b420ee14e6d9a73df65 \
177
+ --hash=sha256:7668b52e102d0ed87cb082380a7e2e1e78737ddecdde129acadb0eccc5423859 \
178
+ --hash=sha256:7df70907e00c970c60b9ef2938d894a9381f38e6b9db73c5be35e59d92e06625 \
179
+ --hash=sha256:7e007132af78ea9df29495dbf7b5824cb71648d7133cf7848a2a5dd00d36f9ff \
180
+ --hash=sha256:835fb5e38fd89328e9c81067fd642b3593c33e1e17e2fdbf77f5676abb14a156 \
181
+ --hash=sha256:8bca7e26c1dd751236cfb0c6c72d4ad61d986e9a41bbf76cb445f69488b2a2bd \
182
+ --hash=sha256:8db032bf0ce9022a8e41a22598eefc802314e81b879ae093f36ce9ddf39ab1ba \
183
+ --hash=sha256:99625a92da8229df6d44335e6fcc558a5037dd0a760e11d84be2260e6f37002f \
184
+ --hash=sha256:9cad97ab29dfc3f0249b483412c85c8ef4766d96cdf9dcf5a1e3caa3f3661cf1 \
185
+ --hash=sha256:a4abaec6ca3ad8660690236d11bfe28dfd707778e2442b45addd2f086d6ef094 \
186
+ --hash=sha256:a6e40afa7f45939ca356f348c8e23048e02cb109ced1eb8420961b2f40fb373a \
187
+ --hash=sha256:a6f2fcca746e8d5910e18782f976489939d54a91f9411c32051b4aab2bd7c513 \
188
+ --hash=sha256:a806db027852538d2ad7555b203300173dd1b77ba116de92da9afbc3a3be3eed \
189
+ --hash=sha256:abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d \
190
+ --hash=sha256:b8526c6d437855442cdd3d87eede9c425c4445ea011ca38d937db299382e6fa3 \
191
+ --hash=sha256:bb06feb762bade6bf3c8b844462274db0c76acc95c52abe8dbed28ae3d44a147 \
192
+ --hash=sha256:c0a33bc9f02c2b17c3ea382f91b4db0e6cde90b63b296422a939886a7a80de1c \
193
+ --hash=sha256:c4a549890a45f57f1ebf99c067a4ad0cb423a05544accaf2b065246827ed9603 \
194
+ --hash=sha256:ca244fa73f50a800cf8c3ebf7fd93149ec37f5cb9596aa8873ae2c1d23498601 \
195
+ --hash=sha256:cf877ab4ed6e302ec1d04952ca358b381a882fbd9d1b07cccbfd61783561f98a \
196
+ --hash=sha256:d9d971ec1e79906046aa3ca266de79eac42f1dbf3612a05dc9368125952bd1a1 \
197
+ --hash=sha256:da25303d91526aac3672ee6d49a2f3db2d9502a4a60b55519feb1a4c7714e07d \
198
+ --hash=sha256:e55e40ff0cc8cc5c07996915ad367fa47da6b3fc091fdadca7f5403239c5fec3 \
199
+ --hash=sha256:f03a532d7dee1bed20bc4884194a16160a2de9ffc6354b3878ec9682bb623c54 \
200
+ --hash=sha256:f1cd098434e83e656abf198f103a8207a8187c0fc110306691a2e94a78d0abb2 \
201
+ --hash=sha256:f2bfb563d0211ce16b63c7cb9395d2c682a23187f54c3d79bfec33e6705473c6 \
202
+ --hash=sha256:f8ffb705ffcf5ddd0e80b65ddf7bed7ee4f5a441ea7d3419e861a12eaf41af58
203
+ # via jinja2
122
204
  mozilla-repo-urls==0.1.1 \
123
205
  --hash=sha256:30510d3519479aa70211145d0ac9cf6e2fadcb8d30fa3b196bb957bd773502ba \
124
206
  --hash=sha256:7364da790751db2a060eb45adbf1d7db89a145ed279ba235f3425db9dd255915
125
207
  # via -r requirements/base.in
208
+ python-dateutil==2.8.2 \
209
+ --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \
210
+ --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9
211
+ # via arrow
212
+ python-slugify==8.0.1 \
213
+ --hash=sha256:70ca6ea68fe63ecc8fa4fcf00ae651fc8a5d02d93dcd12ae6d4fc7ca46c4d395 \
214
+ --hash=sha256:ce0d46ddb668b3be82f4ed5e503dbc33dd815d83e2eb6824211310d3fb172a27
215
+ # via cookiecutter
126
216
  pyyaml==6.0 \
127
217
  --hash=sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf \
128
218
  --hash=sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293 \
@@ -164,7 +254,9 @@ pyyaml==6.0 \
164
254
  --hash=sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f \
165
255
  --hash=sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174 \
166
256
  --hash=sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5
167
- # via -r requirements/base.in
257
+ # via
258
+ # -r requirements/base.in
259
+ # cookiecutter
168
260
  redo==2.0.4 \
169
261
  --hash=sha256:81066955041c853b0e6491eb65a0877dce45131c4cfa3d42d923fc2aa8f7a043 \
170
262
  --hash=sha256:c76e4c23ab2f8840261736a851323cd98493710e7a9d36a1058535dca501f293
@@ -174,11 +266,16 @@ requests==2.28.2 \
174
266
  --hash=sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf
175
267
  # via
176
268
  # -r requirements/base.in
269
+ # cookiecutter
177
270
  # requests-unixsocket
178
271
  requests-unixsocket==0.3.0 \
179
272
  --hash=sha256:28304283ea9357d45fff58ad5b11e47708cfbf5806817aa59b2a363228ee971e \
180
273
  --hash=sha256:c685c680f0809e1b2955339b1e5afc3c0022b3066f4f7eb343f43a6065fc0e5d
181
274
  # via -r requirements/base.in
275
+ six==1.16.0 \
276
+ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
277
+ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
278
+ # via python-dateutil
182
279
  slugid==2.0.0 \
183
280
  --hash=sha256:a950d98b72691178bdd4d6c52743c4a2aa039207cf7a97d71060a111ff9ba297 \
184
281
  --hash=sha256:aec8b0e01c4ad32e38e12d609eab3ec912fd129aaf6b2ded0199b56a5f8fd67c
@@ -188,6 +285,10 @@ taskcluster-urls==13.0.1 \
188
285
  --hash=sha256:b25e122ecec249c4299ac7b20b08db76e3e2025bdaeb699a9d444556de5fd367 \
189
286
  --hash=sha256:f66dcbd6572a6216ab65949f0fa0b91f2df647918028436c384e6af5cd12ae2b
190
287
  # via -r requirements/base.in
288
+ text-unidecode==1.3 \
289
+ --hash=sha256:1311f10e8b895935241623731c2ba64f4c455287888b18189350b67134a822e8 \
290
+ --hash=sha256:bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93
291
+ # via python-slugify
191
292
  urllib3==1.26.14 \
192
293
  --hash=sha256:076907bf8fd355cde77728471316625a4d2f7e713c125f51953bb5b3eecf4f72 \
193
294
  --hash=sha256:75edcdc2f7d85b137124a6c3c9fc3933cdeaa12ecb9a6a959f22797a0feca7e1
@@ -10,10 +10,6 @@ cachetools==5.2.1 \
10
10
  --hash=sha256:5991bc0e08a1319bb618d3195ca5b6bc76646a49c21d55962977197b301cc1fe \
11
11
  --hash=sha256:8462eebf3a6c15d25430a8c27c56ac61340b2ecf60c9ce57afc2b97e450e47da
12
12
  # via tox
13
- chardet==5.1.0 \
14
- --hash=sha256:0d62712b956bc154f85fb0a266e2a3c5913c2967e00348701b32411d6def31e5 \
15
- --hash=sha256:362777fb014af596ad31334fde1e8c327dfdb076e1960d1694662d46a6917ab9
16
- # via tox
17
13
  colorama==0.4.6 \
18
14
  --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
19
15
  --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
@@ -1,19 +1,21 @@
1
1
  import os
2
+ from distutils.util import convert_path
2
3
 
3
4
  from setuptools import find_packages, setup
4
5
 
5
6
  project_dir = os.path.abspath(os.path.dirname(__file__))
6
7
 
8
+ namespace = {}
9
+ version_file = convert_path("src/taskgraph/__init__.py")
10
+ with open(version_file) as fh:
11
+ exec(fh.read(), namespace)
7
12
 
8
13
  with open(os.path.join(project_dir, "requirements/base.in")) as fp:
9
14
  requirements = fp.read().splitlines()
10
15
 
11
- with open(os.path.join(project_dir, "version.txt")) as f:
12
- version = f.read().rstrip()
13
-
14
16
  setup(
15
17
  name="taskcluster-taskgraph",
16
- version=version,
18
+ version=namespace["__version__"],
17
19
  description="Build taskcluster taskgraphs",
18
20
  url="https://github.com/taskcluster/taskgraph",
19
21
  packages=find_packages("src"),
@@ -26,7 +28,6 @@ setup(
26
28
  "Development Status :: 5 - Production/Stable",
27
29
  "Environment :: Console",
28
30
  "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
29
- "Programming Language :: Python :: 3.6",
30
31
  "Programming Language :: Python :: 3.7",
31
32
  "Programming Language :: Python :: 3.8",
32
33
  "Programming Language :: Python :: 3.9",
@@ -1,14 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: taskcluster-taskgraph
3
- Version: 4.2.0
3
+ Version: 5.0.0
4
4
  Summary: Build taskcluster taskgraphs
5
5
  Home-page: https://github.com/taskcluster/taskgraph
6
- License: UNKNOWN
7
- Platform: UNKNOWN
8
6
  Classifier: Development Status :: 5 - Production/Stable
9
7
  Classifier: Environment :: Console
10
8
  Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
11
- Classifier: Programming Language :: Python :: 3.6
12
9
  Classifier: Programming Language :: Python :: 3.7
13
10
  Classifier: Programming Language :: Python :: 3.8
14
11
  Classifier: Programming Language :: Python :: 3.9
@@ -17,6 +14,3 @@ Classifier: Programming Language :: Python :: 3.11
17
14
  Classifier: Topic :: Software Development
18
15
  Provides-Extra: load-image
19
16
  License-File: LICENSE
20
-
21
- UNKNOWN
22
-
@@ -3,7 +3,6 @@ MANIFEST.in
3
3
  README.rst
4
4
  pyproject.toml
5
5
  setup.py
6
- version.txt
7
6
  requirements/base.in
8
7
  requirements/base.txt
9
8
  requirements/dev.in
@@ -1,3 +1,2 @@
1
1
  [console_scripts]
2
2
  taskgraph = taskgraph.main:main
3
-
@@ -1,8 +1,9 @@
1
+ PyYAML>=5.4
1
2
  appdirs>=1.4
2
3
  attrs>=19.1.0
4
+ cookiecutter~=2.1
3
5
  json-e>=2.7
4
6
  mozilla-repo-urls
5
- PyYAML>=5.4
6
7
  redo>=2.0
7
8
  requests>=2.25
8
9
  requests_unixsocket>=0.2
@@ -2,6 +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__ = "5.0.0"
5
6
 
6
7
  # Maximum number of dependencies a single task can have
7
8
  # https://docs.taskcluster.net/reference/platform/taskcluster-queue/references/api#createTask
@@ -3,9 +3,9 @@
3
3
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
4
 
5
5
 
6
- import concurrent.futures as futures
7
6
  import logging
8
7
  import os
8
+ from concurrent import futures
9
9
 
10
10
  import requests
11
11
 
@@ -3,11 +3,11 @@
3
3
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
4
 
5
5
 
6
- import concurrent.futures as futures
7
6
  import copy
8
7
  import logging
9
8
  import os
10
9
  import re
10
+ from concurrent import futures
11
11
  from functools import reduce
12
12
 
13
13
  from requests.exceptions import HTTPError
@@ -3,10 +3,10 @@
3
3
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
4
 
5
5
 
6
- import concurrent.futures as futures
7
6
  import json
8
7
  import logging
9
8
  import sys
9
+ from concurrent import futures
10
10
 
11
11
  from slugid import nice as slugid
12
12
 
@@ -227,7 +227,9 @@ def get_decision_parameters(graph_config, options):
227
227
  # ..but can be overridden by the commit message: if it contains the special
228
228
  # string "DONTBUILD" and this is an on-push decision task, then use the
229
229
  # special 'nothing' target task method.
230
- if "DONTBUILD" in commit_message and options["tasks_for"] == "hg-push":
230
+ if "DONTBUILD" in commit_message and (
231
+ options["tasks_for"] in ("hg-push", "github-push")
232
+ ):
231
233
  parameters["target_tasks_method"] = "nothing"
232
234
 
233
235
  if options.get("optimize_target_tasks") is not None:
@@ -457,9 +457,8 @@ def show_taskgraph(options):
457
457
  try:
458
458
  proc = subprocess.run(
459
459
  diffcmd + [base_path, cur_path],
460
- stdout=subprocess.PIPE,
461
- stderr=subprocess.PIPE,
462
- universal_newlines=True,
460
+ capture_output=True,
461
+ text=True,
463
462
  check=True,
464
463
  )
465
464
  diff_output = proc.stdout
@@ -728,6 +727,82 @@ def test_action_callback(options):
728
727
  sys.exit(1)
729
728
 
730
729
 
730
+ @command(
731
+ "init", description="Initialize a new Taskgraph setup in a new or existing project."
732
+ )
733
+ @argument(
734
+ "-f",
735
+ "--force",
736
+ action="store_true",
737
+ default=False,
738
+ help="Bypass safety checks.",
739
+ )
740
+ @argument(
741
+ "--prompt",
742
+ dest="no_input",
743
+ action="store_false",
744
+ default=True,
745
+ help="Prompt for input rather than using default values (advanced).",
746
+ )
747
+ @argument(
748
+ "--template",
749
+ default="gh:taskcluster/taskgraph",
750
+ help=argparse.SUPPRESS, # used for testing
751
+ )
752
+ def init_taskgraph(options):
753
+ from cookiecutter.main import cookiecutter
754
+
755
+ import taskgraph
756
+ from taskgraph.util.vcs import get_repository
757
+
758
+ repo = get_repository(os.getcwd())
759
+ root = Path(repo.path)
760
+
761
+ # Clean up existing installations if necessary.
762
+ tc_yml = root.joinpath(".taskcluster.yml")
763
+ if tc_yml.is_file():
764
+ if not options["force"]:
765
+ proceed = input(
766
+ "A Taskcluster setup already exists in this repository, "
767
+ "would you like to overwrite it? [y/N]: "
768
+ ).lower()
769
+ while proceed not in ("y", "yes", "n", "no"):
770
+ proceed = input(f"Invalid option '{proceed}'! Try again: ")
771
+
772
+ if proceed[0] == "n":
773
+ sys.exit(1)
774
+
775
+ tc_yml.unlink()
776
+ tg_dir = root.joinpath("taskcluster")
777
+ if tg_dir.is_dir():
778
+ shutil.rmtree(tg_dir)
779
+
780
+ # Populate some defaults from the current repository.
781
+ context = {"project_name": root.name}
782
+
783
+ repo_url = repo.get_url()
784
+ if repo.tool == "git" and "github.com" in repo_url:
785
+ context["repo_host"] = "github"
786
+ elif repo.tool == "hg" and "hg.mozilla.org" in repo_url:
787
+ context["repo_host"] = "hgmo"
788
+ else:
789
+ raise RuntimeError(
790
+ "Repository not supported! Taskgraph currently only "
791
+ "supports repositories hosted on Github or hg.mozilla.org."
792
+ )
793
+
794
+ # Generate the project.
795
+ cookiecutter(
796
+ options["template"],
797
+ checkout=taskgraph.__version__,
798
+ directory="template",
799
+ extra_context=context,
800
+ no_input=options["no_input"],
801
+ output_dir=root.parent,
802
+ overwrite_if_exists=True,
803
+ )
804
+
805
+
731
806
  def create_parser():
732
807
  parser = argparse.ArgumentParser(description="Interact with taskgraph")
733
808
  subparsers = parser.add_subparsers()
@@ -374,7 +374,7 @@ def extract_archive(path, dest_dir, typ):
374
374
  elif typ == "zip":
375
375
  # unzip from stdin has wonky behavior. We don't use a pipe for it.
376
376
  ifh = open(os.devnull, "rb")
377
- args = ["unzip", "-o", str(path)]
377
+ args = ["unzip", "-q", "-o", str(path)]
378
378
  pipe_stdin = False
379
379
  else:
380
380
  raise ValueError("unknown archive format: %s" % path)
@@ -45,11 +45,13 @@ SECRET_BASEURL_TPL = "http://taskcluster/secrets/v1/secret/{}"
45
45
 
46
46
  GITHUB_SSH_FINGERPRINT = (
47
47
  b"github.com ssh-rsa "
48
- b"AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkcc"
49
- b"Krpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFz"
50
- b"LQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaS"
51
- b"jB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3sku"
52
- b"a2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\n"
48
+ b"AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY"
49
+ b"4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDP"
50
+ b"gVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyR"
51
+ b"kQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWO"
52
+ b"WRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZ"
53
+ b"yaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+"
54
+ b"2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=\n"
53
55
  )
54
56
 
55
57
 
@@ -1283,17 +1283,17 @@ def check_run_task_caches(config, tasks):
1283
1283
 
1284
1284
  if not run_task:
1285
1285
  raise Exception(
1286
- "%s is using a cache (%s) reserved for run-task "
1286
+ f"{task['label']} is using a cache ({cache}) reserved for run-task "
1287
1287
  "change the task to use run-task or use a different "
1288
- "cache name" % (task["label"], cache)
1288
+ "cache name"
1289
1289
  )
1290
1290
 
1291
1291
  if not cache.endswith(suffix):
1292
1292
  raise Exception(
1293
- "%s is using a cache (%s) reserved for run-task "
1293
+ f"{task['label']} is using a cache ({cache}) reserved for run-task "
1294
1294
  "but the cache name is not dependent on the contents "
1295
1295
  "of run-task; change the cache name to conform to the "
1296
- "naming requirements" % (task["label"], cache)
1296
+ "naming requirements"
1297
1297
  )
1298
1298
 
1299
1299
  yield task
@@ -93,13 +93,8 @@ def basedir(path, bases):
93
93
 
94
94
 
95
95
  re_cache = {}
96
- # Python versions < 3.7 return r'\/' for re.escape('/').
97
- if re.escape("/") == "/":
98
- MATCH_STAR_STAR_RE = re.compile(r"(^|/)\\\*\\\*/")
99
- MATCH_STAR_STAR_END_RE = re.compile(r"(^|/)\\\*\\\*$")
100
- else:
101
- MATCH_STAR_STAR_RE = re.compile(r"(^|\\\/)\\\*\\\*\\\/")
102
- MATCH_STAR_STAR_END_RE = re.compile(r"(^|\\\/)\\\*\\\*$")
96
+ MATCH_STAR_STAR_RE = re.compile(r"(^|/)\\\*\\\*/")
97
+ MATCH_STAR_STAR_END_RE = re.compile(r"(^|/)\\\*\\\*$")
103
98
 
104
99
 
105
100
  def match(path, pattern):
@@ -13,6 +13,7 @@ from pathlib import Path
13
13
  import pytest
14
14
 
15
15
  from taskgraph import decision
16
+ from taskgraph.util.vcs import GitRepository, HgRepository
16
17
  from taskgraph.util.yaml import load_yaml
17
18
 
18
19
  FAKE_GRAPH_CONFIG = {"product-dir": "browser", "taskgraph": {}}
@@ -91,6 +92,55 @@ class TestGetDecisionParameters(unittest.TestCase):
91
92
  params = decision.get_decision_parameters(FAKE_GRAPH_CONFIG, self.options)
92
93
  self.assertEqual(params["owner"], "ffxbld@noreply.mozilla.org")
93
94
 
95
+ @unittest.mock.patch.object(
96
+ GitRepository,
97
+ "get_commit_message",
98
+ unittest.mock.MagicMock(return_value="Add Foo"),
99
+ )
100
+ @unittest.mock.patch.object(
101
+ HgRepository,
102
+ "get_commit_message",
103
+ unittest.mock.MagicMock(return_value="Add Foo"),
104
+ )
105
+ def test_regular_commit_message_yields_default_target_tasks_method(self):
106
+ """
107
+ Ensures `target_tasks_method` is `default` when the commit message does not contain
108
+ `DONTBUILD`.
109
+ """
110
+ self.options["tasks_for"] = "github-push"
111
+ params = decision.get_decision_parameters(FAKE_GRAPH_CONFIG, self.options)
112
+ self.assertEqual(params["target_tasks_method"], "default")
113
+
114
+ self.options["tasks_for"] = "hg-push"
115
+ params = decision.get_decision_parameters(FAKE_GRAPH_CONFIG, self.options)
116
+ self.assertEqual(params["target_tasks_method"], "default")
117
+
118
+ @unittest.mock.patch.object(
119
+ GitRepository,
120
+ "get_commit_message",
121
+ unittest.mock.MagicMock(return_value="DONTBUILD"),
122
+ )
123
+ @unittest.mock.patch.object(
124
+ HgRepository,
125
+ "get_commit_message",
126
+ unittest.mock.MagicMock(return_value="DONTBUILD"),
127
+ )
128
+ def test_dontbuild_commit_message_yields_default_target_tasks_method(self):
129
+ """
130
+ Ensures `target_tasks_method` is `nothing` when the commit message contains `DONTBUILD`.
131
+ """
132
+ self.options["tasks_for"] = "github-release"
133
+ params = decision.get_decision_parameters(FAKE_GRAPH_CONFIG, self.options)
134
+ self.assertNotEqual(params["target_tasks_method"], "nothing")
135
+
136
+ self.options["tasks_for"] = "github-push"
137
+ params = decision.get_decision_parameters(FAKE_GRAPH_CONFIG, self.options)
138
+ self.assertEqual(params["target_tasks_method"], "nothing")
139
+
140
+ self.options["tasks_for"] = "hg-push"
141
+ params = decision.get_decision_parameters(FAKE_GRAPH_CONFIG, self.options)
142
+ self.assertEqual(params["target_tasks_method"], "nothing")
143
+
94
144
 
95
145
  @pytest.mark.parametrize(
96
146
  "candidate_base_ref, base_rev, expected_base_ref",