taskcluster-taskgraph 11.2.4__tar.gz → 12.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 (248) hide show
  1. taskcluster_taskgraph-12.0.0/.readthedocs.yaml +14 -0
  2. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/CHANGELOG.md +18 -0
  3. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/PKG-INFO +1 -1
  4. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/howto/run-locally.rst +2 -0
  5. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/index.rst +1 -1
  6. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/migrations.rst +21 -0
  7. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/transforms/chunking.rst +3 -3
  8. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/transforms/from_deps.rst +3 -3
  9. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/transforms/index.rst +4 -3
  10. taskcluster_taskgraph-12.0.0/docs/reference/transforms/matrix.rst +200 -0
  11. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/transforms/task_context.rst +3 -3
  12. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/__init__.py +1 -1
  13. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/actions/util.py +9 -2
  14. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/docker.py +2 -2
  15. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/generator.py +3 -3
  16. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/parameters.py +13 -10
  17. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/task.py +1 -1
  18. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/cached_tasks.py +1 -4
  19. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/docker_image.py +2 -2
  20. taskcluster_taskgraph-12.0.0/src/taskgraph/transforms/matrix.py +112 -0
  21. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/run/__init__.py +3 -1
  22. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/task.py +1 -1
  23. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/task_context.py +2 -9
  24. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/docker.py +1 -1
  25. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/templates.py +15 -1
  26. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/kinds/codecov/kind.yml +1 -1
  27. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/kinds/push-image/kind.yml +2 -2
  28. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/kinds/test/kind.yml +17 -6
  29. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_morph.py +1 -1
  30. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_parameters.py +10 -0
  31. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transform_docker_image.py +2 -2
  32. taskcluster_taskgraph-12.0.0/test/test_transforms_matrix.py +133 -0
  33. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transforms_run.py +39 -0
  34. taskcluster_taskgraph-11.2.4/.readthedocs.yaml +0 -13
  35. taskcluster_taskgraph-11.2.4/MANIFEST.in +0 -6
  36. taskcluster_taskgraph-11.2.4/taskcluster/self_taskgraph/transforms/test.py +0 -34
  37. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/.codespell-ignore-words.txt +0 -0
  38. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/.github/workflows/codeql-analysis.yml +0 -0
  39. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/.github/workflows/pypi-publish.yml +0 -0
  40. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/.gitignore +0 -0
  41. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/.hatch_build.py +0 -0
  42. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/.pre-commit-config.yaml +0 -0
  43. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/.taskcluster.yml +0 -0
  44. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/.yamllint +0 -0
  45. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/CODE_OF_CONDUCT.md +0 -0
  46. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/CONTRIBUTING.rst +0 -0
  47. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/LICENSE +0 -0
  48. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/Makefile +0 -0
  49. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/README.rst +0 -0
  50. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/concepts/index.rst +0 -0
  51. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/concepts/kind.rst +0 -0
  52. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/concepts/loading.rst +0 -0
  53. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/concepts/optimization.rst +0 -0
  54. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/concepts/scopes.rst +0 -0
  55. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/concepts/task-graphs.rst +0 -0
  56. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/concepts/taskcluster.rst +0 -0
  57. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/concepts/transforms.rst +0 -0
  58. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/conf.py +0 -0
  59. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/contributing.rst +0 -0
  60. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/glossary.rst +0 -0
  61. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/howto/bootstrap-taskgraph.rst +0 -0
  62. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/howto/create-actions.rst +0 -0
  63. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/howto/create-tasks.rst +0 -0
  64. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/howto/debugging.rst +0 -0
  65. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/howto/docker.rst +0 -0
  66. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/howto/index.rst +0 -0
  67. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/howto/send-notifications.rst +0 -0
  68. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/howto/use-fetches.rst +0 -0
  69. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/cli.rst +0 -0
  70. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/index.rst +0 -0
  71. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/optimization-strategies.rst +0 -0
  72. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/parameters.rst +0 -0
  73. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/source/modules.rst +0 -0
  74. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/source/taskgraph.actions.rst +0 -0
  75. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/source/taskgraph.loader.rst +0 -0
  76. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/source/taskgraph.optimize.rst +0 -0
  77. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/source/taskgraph.rst +0 -0
  78. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/source/taskgraph.transforms.rst +0 -0
  79. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/source/taskgraph.transforms.run.rst +0 -0
  80. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/reference/source/taskgraph.util.rst +0 -0
  81. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/tutorials/connecting-taskcluster.rst +0 -0
  82. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/tutorials/creating-a-task-graph.rst +0 -0
  83. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/tutorials/example-taskcluster.yml +0 -0
  84. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/tutorials/getting-started.rst +0 -0
  85. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/docs/tutorials/index.rst +0 -0
  86. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/make.bat +0 -0
  87. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/pyproject.toml +0 -0
  88. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/actions/__init__.py +0 -0
  89. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/actions/add_new_jobs.py +0 -0
  90. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/actions/cancel.py +0 -0
  91. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/actions/cancel_all.py +0 -0
  92. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/actions/rebuild_cached_tasks.py +0 -0
  93. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/actions/registry.py +0 -0
  94. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/actions/retrigger.py +0 -0
  95. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/config.py +0 -0
  96. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/create.py +0 -0
  97. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/decision.py +0 -0
  98. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/filter_tasks.py +0 -0
  99. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/graph.py +0 -0
  100. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/loader/__init__.py +0 -0
  101. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/loader/default.py +0 -0
  102. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/loader/transform.py +0 -0
  103. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/main.py +0 -0
  104. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/morph.py +0 -0
  105. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/optimize/__init__.py +0 -0
  106. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/optimize/base.py +0 -0
  107. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/optimize/strategies.py +0 -0
  108. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/run-task/fetch-content +0 -0
  109. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/run-task/hgrc +0 -0
  110. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/run-task/robustcheckout.py +0 -0
  111. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/run-task/run-task +0 -0
  112. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/target_tasks.py +0 -0
  113. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/taskgraph.py +0 -0
  114. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/__init__.py +0 -0
  115. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/base.py +0 -0
  116. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/chunking.py +0 -0
  117. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/code_review.py +0 -0
  118. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/fetch.py +0 -0
  119. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/from_deps.py +0 -0
  120. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/notify.py +0 -0
  121. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/run/common.py +0 -0
  122. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/run/index_search.py +0 -0
  123. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/run/run_task.py +0 -0
  124. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/transforms/run/toolchain.py +0 -0
  125. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/__init__.py +0 -0
  126. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/archive.py +0 -0
  127. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/attributes.py +0 -0
  128. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/cached_tasks.py +0 -0
  129. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/copy.py +0 -0
  130. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/dependencies.py +0 -0
  131. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/hash.py +0 -0
  132. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/keyed_by.py +0 -0
  133. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/parameterization.py +0 -0
  134. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/path.py +0 -0
  135. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/python_path.py +0 -0
  136. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/readonlydict.py +0 -0
  137. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/schema.py +0 -0
  138. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/set_name.py +0 -0
  139. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/shell.py +0 -0
  140. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/taskcluster.py +0 -0
  141. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/taskgraph.py +0 -0
  142. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/time.py +0 -0
  143. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/treeherder.py +0 -0
  144. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/vcs.py +0 -0
  145. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/verify.py +0 -0
  146. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/workertypes.py +0 -0
  147. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/src/taskgraph/util/yaml.py +0 -0
  148. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/config.yml +0 -0
  149. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/REGISTRY +0 -0
  150. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/decision/Dockerfile +0 -0
  151. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/decision/HASH +0 -0
  152. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/decision/README.md +0 -0
  153. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/decision/VERSION +0 -0
  154. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/decision/system-setup.sh +0 -0
  155. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/fetch/Dockerfile +0 -0
  156. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/image_builder/README.rst +0 -0
  157. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/index-task/Dockerfile +0 -0
  158. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/index-task/README +0 -0
  159. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/index-task/insert-indexes.js +0 -0
  160. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/index-task/package.json +0 -0
  161. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/index-task/yarn.lock +0 -0
  162. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/python/Dockerfile +0 -0
  163. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/run-task/Dockerfile +0 -0
  164. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/run-task/system-setup.sh +0 -0
  165. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/skopeo/Dockerfile +0 -0
  166. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/skopeo/policy.json +0 -0
  167. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/docker/skopeo/push_image.sh +0 -0
  168. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/kinds/check/kind.yml +0 -0
  169. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/kinds/doc/kind.yml +0 -0
  170. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/kinds/docker-image/kind.yml +0 -0
  171. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/kinds/fetch/kind.yml +0 -0
  172. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/scripts/codecov-upload.py +0 -0
  173. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/scripts/external_tools/tooltool.py +0 -0
  174. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/self_taskgraph/transforms/push_image.py +0 -0
  175. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/test/params/main-repo-pull-request-untrusted.yml +0 -0
  176. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/test/params/main-repo-pull-request.yml +0 -0
  177. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/test/params/main-repo-push.yml +0 -0
  178. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/taskcluster/test/params/main-repo-release.yml +0 -0
  179. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/template/cookiecutter.json +0 -0
  180. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/template/hooks/post_gen_project.py +0 -0
  181. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/template/{{cookiecutter.project_name}}/taskcluster/config.yml +0 -0
  182. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/template/{{cookiecutter.project_name}}/taskcluster/docker/linux/Dockerfile +0 -0
  183. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/template/{{cookiecutter.project_name}}/taskcluster/kinds/docker-image/kind.yml +0 -0
  184. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/template/{{cookiecutter.project_name}}/taskcluster/kinds/hello/kind.yml +0 -0
  185. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/template/{{cookiecutter.project_name}}/taskcluster/{{cookiecutter.project_slug}}_taskgraph/transforms/hello.py +0 -0
  186. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/template/{{cookiecutter.project_name}}/taskcluster.github.yml +0 -0
  187. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/template/{{cookiecutter.project_name}}/taskcluster.hgmo.yml +0 -0
  188. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/__init__.py +0 -0
  189. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/automationrelevance.json +0 -0
  190. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/conftest.py +0 -0
  191. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/data/task_context.yml +0 -0
  192. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/data/taskcluster/config.yml +0 -0
  193. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/data/taskcluster/docker/hello-world/Dockerfile +0 -0
  194. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/data/taskcluster/docker/hello-world-tag/Dockerfile +0 -0
  195. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/data/taskcluster/docker/hello-world-tag/REGISTRY +0 -0
  196. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/data/taskcluster/docker/hello-world-tag/VERSION +0 -0
  197. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/data/taskcluster/scripts/toolchain/run.ps1 +0 -0
  198. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/data/taskcluster/scripts/toolchain/run.sh +0 -0
  199. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/data/taskcluster/test_taskgraph/transforms/foo.py +0 -0
  200. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/data/testmod/thing.py +0 -0
  201. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/fixtures/gen.py +0 -0
  202. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/fixtures/vcs.py +0 -0
  203. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/mockedopen.py +0 -0
  204. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_actions_rebuild_cached_tasks.py +0 -0
  205. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_actions_registry.py +0 -0
  206. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_config.py +0 -0
  207. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_create.py +0 -0
  208. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_decision.py +0 -0
  209. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_docker.py +0 -0
  210. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_generator.py +0 -0
  211. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_graph.py +0 -0
  212. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_main.py +0 -0
  213. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_optimize.py +0 -0
  214. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_optimize_strategies.py +0 -0
  215. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_scripts_fetch_content.py +0 -0
  216. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_scripts_run_task.py +0 -0
  217. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_target_tasks.py +0 -0
  218. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_taskgraph.py +0 -0
  219. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transform_chunking.py +0 -0
  220. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transform_task_context.py +0 -0
  221. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transforms_base.py +0 -0
  222. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transforms_cached_tasks.py +0 -0
  223. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transforms_fetch.py +0 -0
  224. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transforms_from_deps.py +0 -0
  225. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transforms_notify.py +0 -0
  226. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transforms_run_run_task.py +0 -0
  227. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transforms_run_toolchain.py +0 -0
  228. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_transforms_task.py +0 -0
  229. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_archive.py +0 -0
  230. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_attributes.py +0 -0
  231. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_cached_tasks.py +0 -0
  232. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_copy.py +0 -0
  233. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_dependencies.py +0 -0
  234. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_docker.py +0 -0
  235. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_parameterization.py +0 -0
  236. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_path.py +0 -0
  237. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_python_path.py +0 -0
  238. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_readonlydict.py +0 -0
  239. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_schema.py +0 -0
  240. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_taskcluster.py +0 -0
  241. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_templates.py +0 -0
  242. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_time.py +0 -0
  243. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_treeherder.py +0 -0
  244. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_vcs.py +0 -0
  245. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_verify.py +0 -0
  246. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_workertypes.py +0 -0
  247. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/test/test_util_yaml.py +0 -0
  248. {taskcluster_taskgraph-11.2.4 → taskcluster_taskgraph-12.0.0}/uv.lock +0 -0
@@ -0,0 +1,14 @@
1
+ ---
2
+ version: 2
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.12"
7
+ commands:
8
+ - asdf plugin add uv
9
+ - asdf install uv latest
10
+ - asdf global uv latest
11
+ - uv sync --only-dev
12
+ - uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
13
+ sphinx:
14
+ configuration: docs/conf.py
@@ -1,5 +1,23 @@
1
1
  # Change Log
2
2
 
3
+ ## [12.0.0] - 2024-10-25
4
+
5
+ ### Added
6
+
7
+ - New `matrix` transforms added to allow easily splitting tasks
8
+ - The `-p/--parameters` flag now supports `index=<index>` as a means of discovering parameters
9
+
10
+ ### Fixed
11
+
12
+ - BREAKING CHANGE: `target_tasks_method` filter no longer implicitly added if other filters are used
13
+ - An OSError when generating docker contexts when many files were involved
14
+ - A bug when attempting to find prior actions in Github action tasks
15
+ - The `when.files-changed` optimization no longer implicitly adds unrelated `tasks-from` files
16
+
17
+ ### Changed
18
+
19
+ - BREAKING CHANGE: docker image task labels changed from `build-docker-image` to `docker-image`
20
+
3
21
  ## [11.2.4] - 2024-10-16
4
22
 
5
23
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: taskcluster-taskgraph
3
- Version: 11.2.4
3
+ Version: 12.0.0
4
4
  Summary: Build taskcluster taskgraphs
5
5
  Project-URL: Repository, https://github.com/taskcluster/taskgraph
6
6
  Project-URL: Issues, https://github.com/taskcluster/taskgraph/issues
@@ -78,6 +78,8 @@ following formats are accepted:
78
78
  and used.
79
79
  * A value of ``project=<project>``. The ``parameters.yml`` artifact from the
80
80
  latest decision task on ``<project>`` will be downloaded and used.
81
+ * A value of ``index=<index>``. The ``parameters.yml`` artifact will be
82
+ downloaded from the decision task pointed to by the specified index path.
81
83
  * Path to a directory containing multiple parameter files. Any ``.yml`` file in
82
84
  the directory will be considered a parameter set.
83
85
 
@@ -70,7 +70,7 @@ of tasks, and submit them all to Taskcluster. But you can also test out the
70
70
  taskgraph full
71
71
 
72
72
  You'll notice that ``taskgraph init`` has created a couple of tasks for us
73
- already, namely ``build-docker-image-linux`` and ``hello-world``.
73
+ already, namely ``docker-image-linux`` and ``hello-world``.
74
74
 
75
75
  .. note::
76
76
 
@@ -3,6 +3,27 @@ Migration Guide
3
3
 
4
4
  This page can help when migrating Taskgraph across major versions.
5
5
 
6
+ 11.x -> 12.x
7
+ ------------
8
+
9
+ * Add ``target_tasks_method`` to the front of the ``filters`` parameter wherever
10
+ you are also using a custom filter.
11
+
12
+ For example, if you are passing in:
13
+
14
+ .. code-block:: yaml
15
+
16
+ filters: ["my_custom_filter"]
17
+
18
+ Change it to:
19
+
20
+ .. code-block:: yaml
21
+
22
+ filters: ["target_tasks_method", "my_custom_filter"]
23
+
24
+ No action is necessary if the ``filters`` parameter was empty.
25
+ * Change all references from ``build-docker-image`` to ``docker-image``.
26
+
6
27
  10.x -> 11.x
7
28
  ------------
8
29
 
@@ -1,7 +1,7 @@
1
- .. _chunking:
1
+ .. _chunking transforms:
2
2
 
3
- Chunking Tasks
4
- ==============
3
+ Chunking Transforms
4
+ ===================
5
5
 
6
6
  The :mod:`taskgraph.transforms.chunking` module contains transforms that aid
7
7
  in splitting a single entry in a ``kind`` into multiple tasks. This is often
@@ -1,7 +1,7 @@
1
- .. _from_deps:
1
+ .. _from_deps transforms:
2
2
 
3
- From Dependencies
4
- =================
3
+ From Dependencies Transforms
4
+ ============================
5
5
 
6
6
  The :mod:`taskgraph.transforms.from_deps` transforms can be used to create
7
7
  tasks based on the kind dependencies, filtering on common attributes like the
@@ -8,6 +8,7 @@ provides, read below to learn how to use them.
8
8
 
9
9
  .. toctree::
10
10
 
11
- from_deps
12
- task_context
13
- chunking
11
+ From Dependencies <from_deps>
12
+ Task Context <task_context>
13
+ Matrix <matrix>
14
+ Chunking <chunking>
@@ -0,0 +1,200 @@
1
+ .. _matrix transforms:
2
+
3
+ Matrix Transforms
4
+ =================
5
+
6
+ The :mod:`taskgraph.transforms.matrix` transforms can be used to split a base
7
+ task into many subtasks based on a defined matrix.
8
+
9
+ These transforms are useful if you need to have many tasks that are very
10
+ similar except for some small configuration differences.
11
+
12
+ Usage
13
+ -----
14
+
15
+ Add the transform to the ``transforms`` key in your ``kind.yml`` file:
16
+
17
+ .. code-block:: yaml
18
+
19
+ transforms:
20
+ - taskgraph.transforms.matrix
21
+ # ...
22
+
23
+ Then create a ``matrix`` section in your task definition, e.g:
24
+
25
+ .. code-block:: yaml
26
+
27
+ tasks:
28
+ test:
29
+ matrix:
30
+ os: ["win", "mac", "linux"]
31
+
32
+ # rest of task definition
33
+
34
+ This will split the ``test`` task into three; ``test-win``, ``test-mac`` and
35
+ ``test-linux``.
36
+
37
+ Matrix with Multiple Rows
38
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
39
+
40
+ You can add as many rows as you like to the matrix, and every combination of
41
+ tasks will be generated. For example, the following matrix:
42
+
43
+ .. code-block:: yaml
44
+
45
+ tasks:
46
+ test:
47
+ matrix:
48
+ os: ["win", "mac", "linux"]
49
+ python: ["py312", "py311"]
50
+
51
+ # rest of task definition
52
+
53
+ Will generate these tasks:
54
+
55
+ - ``test-win-py312``
56
+ - ``test-win-py311``
57
+ - ``test-mac-py312``
58
+ - ``test-mac-py311``
59
+ - ``test-linux-py312``
60
+ - ``test-linux-py311``
61
+
62
+ Note that the name of the tasks will be built based on the order of rows in the
63
+ matrix.
64
+
65
+ Substituting Matrix Context into the Task Definition
66
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67
+
68
+ Of course these tasks will be identical, so you'll want to change other parts
69
+ of the task definition based on the matrix values.
70
+
71
+ Substituting Values in Yaml
72
+ ```````````````````````````
73
+
74
+ The simplest way to change a matrix task's definition, is to use the built-in
75
+ yaml substitution:
76
+
77
+ .. code-block:: yaml
78
+
79
+ tasks:
80
+ test:
81
+ matrix:
82
+ os: ["win", "mac", "linux"]
83
+ description: Run {matrix[os]} tests
84
+ worker-type: {matrix[os]}-worker
85
+
86
+ Limiting Substitution
87
+ '''''''''''''''''''''
88
+
89
+ By default, all keys and values in the task definition will be checked for
90
+ substitution parameters. But in some cases, it might be desirable to limit which
91
+ keys get substituted, such as when using the ``matrix`` transforms alongside
92
+ other transforms that perform substitution, such as the
93
+ :mod:`~taskgraph.transforms.task_context` or
94
+ :mod:`~taskgraph.transforms.chunking` transforms.
95
+
96
+ To limit the fields that will be evaluated for substitution, you can pass in the
97
+ ``substitution-fields`` config:
98
+
99
+ .. code-block:: yaml
100
+
101
+ tasks:
102
+ test:
103
+ matrix:
104
+ substitution-fields: ["worker-type"]
105
+ os: ["win"]
106
+ description: Run {matrix[os]} tests
107
+ worker-type: {matrix[os]}-worker
108
+
109
+ In the example above, ``worker-type`` will evaluate to ``win-worker``, whereas
110
+ the description will be the literal string ``Run {matrix[os]} tests``. Dot
111
+ notation can be used in ``substitution-fields`` to limit substitution to some
112
+ sub configuration of the task definition.
113
+
114
+ Substituting Values in a Later Transform
115
+ ````````````````````````````````````````
116
+
117
+ For more advanced cases, you may wish to use a later transform to act on the
118
+ result of the matrix evaluation. To accomplish this, the ``matrix`` transforms
119
+ will set a ``matrix`` attribute that contains all matrix values applicable to
120
+ the task.
121
+
122
+ For example, let's say you have a ``kind.yml`` like:
123
+
124
+ .. code-block:: yaml
125
+
126
+ transforms:
127
+ - taskgraph.transforms.matrix
128
+ - custom_taskgraph.transforms.custom
129
+ # ...
130
+
131
+ tasks:
132
+ test:
133
+ matrix:
134
+ os: ["win", "mac", "linux"]
135
+
136
+ Then in your ``custom.py`` transform file, you could add:
137
+
138
+ .. code-block:: python
139
+
140
+ @transforms.add
141
+ def set_worker_type_and_description(config, tasks):
142
+ for task in tasks:
143
+ matrix = task["attributes"]["matrix"]
144
+ task["description"] = f"Run {matrix['os']} tests"
145
+ task["worker-type"] = f"{matrix['os']}-worker"
146
+ yield task
147
+
148
+ This example will yield the exact same result as the yaml example above, but it
149
+ allows for more complex logic.
150
+
151
+ Excluding Matrix Combinations
152
+ -----------------------------
153
+
154
+ Sometimes you might not want to generate *every* possible combination of tasks,
155
+ and there may be some you wish to exclude. This can be accomplished using the
156
+ ``exclude`` config:
157
+
158
+ .. code-block:: yaml
159
+
160
+ tasks:
161
+ test:
162
+ matrix:
163
+ os: ["win", "mac"]
164
+ arch: ["x86", "arm64"]
165
+ python: ["py312", "py311"]
166
+ exclude:
167
+ - os: mac
168
+ arch: x86
169
+ - os: win
170
+ arch: arm64
171
+ python: py311
172
+
173
+ This will cause all combinations where ``os == mac and arch == x86`` to be
174
+ skipped, as well as the specific combination where ``os == win and arch ==
175
+ arm64 and python == py311``. This means the following tasks will be generated:
176
+
177
+ * test-win-x86-py311
178
+ * test-win-x86-py312
179
+ * test-win-arm64-py312
180
+ * test-mac-arm64-py311
181
+ * test-mac-arm64-py312
182
+
183
+ Customizing Task Names
184
+ ----------------------
185
+
186
+ By default, the ``matrix`` transforms will append each matrix value to the
187
+ task's name, separated by a dash. If some other format is desired, you can specify
188
+ the ``set-name`` config:
189
+
190
+ .. code-block:: yaml
191
+
192
+ tasks:
193
+ test:
194
+ matrix:
195
+ set-name: "test-{matrix[os]}/{matrix[python]}"
196
+ os: ["win"]
197
+ python: ["py312"]
198
+
199
+ Instead of creating a task with the name ``test-win-py312``, the name will be
200
+ ``test-win/py312``.
@@ -1,7 +1,7 @@
1
- .. _task_context:
1
+ .. _task_context transforms:
2
2
 
3
- Task Context
4
- ============
3
+ Task Context Transforms
4
+ =======================
5
5
 
6
6
  The :mod:`taskgraph.transforms.task_context` transform can be used to
7
7
  substitute values into any field in a task with data that is not known
@@ -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__ = "11.2.4"
5
+ __version__ = "12.0.0"
6
6
 
7
7
  # Maximum number of dependencies a single task can have
8
8
  # https://docs.taskcluster.net/docs/reference/platform/queue/api#createTask
@@ -64,12 +64,19 @@ def fetch_graph_and_labels(parameters, graph_config, task_group_id=None):
64
64
  raise
65
65
  logger.debug(f"No label-to-taskid.json found for {task_id}: {e}")
66
66
 
67
- namespace = "{}.v2.{}.pushlog-id.{}.actions".format(
67
+ # for backwards compatibility, look up actions via pushlog-id
68
+ pushlog_namespace = "{}.v2.{}.pushlog-id.{}.actions".format(
68
69
  graph_config["trust-domain"],
69
70
  parameters["project"],
70
71
  parameters["pushlog_id"],
71
72
  )
72
- for task_id in list_tasks(namespace):
73
+ # ... but also look by revision, since github doesn't have pushlog-id
74
+ rev_namespace = "{}.v2.{}.revision.{}.actions".format(
75
+ graph_config["trust-domain"],
76
+ parameters["project"],
77
+ parameters["head_rev"],
78
+ )
79
+ for task_id in set(list_tasks(pushlog_namespace) + list_tasks(rev_namespace)):
73
80
  fetches.append(e.submit(fetch_action, task_id))
74
81
 
75
82
  # Similarly for cron tasks..
@@ -47,7 +47,7 @@ def get_image_digest(image_name):
47
47
  strict=False,
48
48
  )
49
49
  tasks = load_tasks_for_kind(params, "docker-image")
50
- task = tasks[f"build-docker-image-{image_name}"]
50
+ task = tasks[f"docker-image-{image_name}"]
51
51
  return task.attributes["cached_task"]["digest"]
52
52
 
53
53
 
@@ -61,7 +61,7 @@ def load_image_by_name(image_name, tag=None):
61
61
  strict=False,
62
62
  )
63
63
  tasks = load_tasks_for_kind(params, "docker-image")
64
- task = tasks[f"build-docker-image-{image_name}"]
64
+ task = tasks[f"docker-image-{image_name}"]
65
65
 
66
66
  indexes = task.optimization.get("index-search", [])
67
67
  task_id = IndexSearch().should_replace_task(task, {}, None, indexes)
@@ -269,9 +269,9 @@ class TaskGraphGenerator:
269
269
  logger.debug(f"Dumping parameters:\n{repr(parameters)}")
270
270
 
271
271
  filters = parameters.get("filters", [])
272
- # Always add legacy target tasks method until we deprecate that API.
273
- if "target_tasks_method" not in filters:
274
- filters.insert(0, "target_tasks_method")
272
+ if not filters:
273
+ # Default to target_tasks_method if none specified.
274
+ filters.append("target_tasks_method")
275
275
  filters = [filter_tasks.filter_task_functions[f] for f in filters]
276
276
 
277
277
  yield self.verify("parameters", parameters)
@@ -193,7 +193,7 @@ class Parameters(ReadOnlyDict):
193
193
  if spec is None:
194
194
  return "defaults"
195
195
 
196
- if any(spec.startswith(s) for s in ("task-id=", "project=")):
196
+ if any(spec.startswith(s) for s in ("task-id=", "project=", "index=")):
197
197
  return spec
198
198
 
199
199
  result = urlparse(spec)
@@ -327,16 +327,19 @@ def load_parameters_file(
327
327
  task_id = None
328
328
  if spec.startswith("task-id="):
329
329
  task_id = spec.split("=")[1]
330
- elif spec.startswith("project="):
331
- if trust_domain is None:
332
- raise ValueError(
333
- "Can't specify parameters by project "
334
- "if trust domain isn't supplied.",
330
+ elif spec.startswith("project=") or spec.startswith("index="):
331
+ if spec.startswith("project="):
332
+ if trust_domain is None:
333
+ raise ValueError(
334
+ "Can't specify parameters by project "
335
+ "if trust domain isn't supplied.",
336
+ )
337
+ index = "{trust_domain}.v2.{project}.latest.taskgraph.decision".format(
338
+ trust_domain=trust_domain,
339
+ project=spec.split("=")[1],
335
340
  )
336
- index = "{trust_domain}.v2.{project}.latest.taskgraph.decision".format(
337
- trust_domain=trust_domain,
338
- project=spec.split("=")[1],
339
- )
341
+ else:
342
+ index = spec.split("=")[1]
340
343
  task_id = find_task_id(index)
341
344
 
342
345
  if task_id:
@@ -17,7 +17,7 @@ class Task:
17
17
  - task: the task definition (JSON-able dictionary)
18
18
  - optimization: optimization to apply to the task (see taskgraph.optimize)
19
19
  - dependencies: tasks this one depends on, in the form {name: label}, for example
20
- {'build': 'build-linux64/opt', 'docker-image': 'build-docker-image-desktop-test'}
20
+ {'build': 'build-linux64/opt', 'docker-image': 'docker-image-desktop-test'}
21
21
  - soft_dependencies: tasks this one may depend on if they are available post
22
22
  optimisation. They are set as a list of tasks label.
23
23
  - if_dependencies: only run this task if at least one of these dependencies
@@ -14,10 +14,7 @@ transforms = TransformSequence()
14
14
 
15
15
  def order_tasks(config, tasks):
16
16
  """Iterate image tasks in an order where parent tasks come first."""
17
- if config.kind == "docker-image":
18
- kind_prefix = "build-docker-image-"
19
- else:
20
- kind_prefix = config.kind + "-"
17
+ kind_prefix = config.kind + "-"
21
18
 
22
19
  pending = deque(tasks)
23
20
  task_labels = {task["label"] for task in pending}
@@ -131,7 +131,7 @@ def fill_template(config, tasks):
131
131
  # include some information that is useful in reconstructing this task
132
132
  # from JSON
133
133
  taskdesc = {
134
- "label": "build-docker-image-" + image_name,
134
+ "label": "docker-image-" + image_name,
135
135
  "description": description,
136
136
  "attributes": {
137
137
  "image_name": image_name,
@@ -193,7 +193,7 @@ def fill_template(config, tasks):
193
193
 
194
194
  if parent:
195
195
  deps = taskdesc.setdefault("dependencies", {})
196
- deps["parent"] = f"build-docker-image-{parent}"
196
+ deps["parent"] = f"docker-image-{parent}"
197
197
  worker["env"]["PARENT_TASK_ID"] = {
198
198
  "task-reference": "<parent>",
199
199
  }
@@ -0,0 +1,112 @@
1
+ # This Source Code Form is subject to the terms of the Mozilla Public
2
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
+
5
+ """
6
+ Transforms used to split one task definition into many tasks, governed by a
7
+ matrix defined in the definition.
8
+ """
9
+
10
+ from copy import deepcopy
11
+ from textwrap import dedent
12
+
13
+ from voluptuous import Extra, Optional, Required
14
+
15
+ from taskgraph.transforms.base import TransformSequence
16
+ from taskgraph.util.schema import Schema
17
+ from taskgraph.util.templates import substitute_task_fields
18
+
19
+ MATRIX_SCHEMA = Schema(
20
+ {
21
+ Required("name"): str,
22
+ Optional("matrix"): {
23
+ Optional(
24
+ "exclude",
25
+ description=dedent(
26
+ """
27
+ Exclude the specified combination(s) of matrix values from the
28
+ final list of tasks.
29
+
30
+ If only a subset of the possible rows are present in the
31
+ exclusion rule, then *all* combinations including that subset
32
+ subset will be excluded.
33
+ """.lstrip()
34
+ ),
35
+ ): [{str: str}],
36
+ Optional(
37
+ "set-name",
38
+ description=dedent(
39
+ """
40
+ Sets the task name to the specified format string.
41
+
42
+ Useful for cases where the default of joining matrix values by
43
+ a dash is not desired.
44
+ """.lstrip()
45
+ ),
46
+ ): str,
47
+ Optional(
48
+ "substitution-fields",
49
+ description=dedent(
50
+ """
51
+ List of fields in the task definition to substitute matrix values into.
52
+
53
+ If not specified, all fields in the task definition will be
54
+ substituted.
55
+ """
56
+ ),
57
+ ): [str],
58
+ Extra: [str],
59
+ },
60
+ Extra: object,
61
+ },
62
+ )
63
+ """Schema for matrix transforms."""
64
+
65
+ transforms = TransformSequence()
66
+ transforms.add_validate(MATRIX_SCHEMA)
67
+
68
+
69
+ def _resolve_matrix(tasks, key, values, exclude):
70
+ for task in tasks:
71
+ for value in values:
72
+ new_task = deepcopy(task)
73
+ new_task["name"] = f"{new_task['name']}-{value}"
74
+
75
+ matrix = new_task.setdefault("attributes", {}).setdefault("matrix", {})
76
+ matrix[key] = value
77
+
78
+ for rule in exclude:
79
+ if all(matrix.get(k) == v for k, v in rule.items()):
80
+ break
81
+ else:
82
+ yield new_task
83
+
84
+
85
+ @transforms.add
86
+ def split_matrix(config, tasks):
87
+ for task in tasks:
88
+ if "matrix" not in task:
89
+ yield task
90
+ continue
91
+
92
+ matrix = task.pop("matrix")
93
+ set_name = matrix.pop("set-name", None)
94
+ fields = matrix.pop("substitution-fields", task.keys())
95
+ exclude = matrix.pop("exclude", {})
96
+
97
+ new_tasks = [task]
98
+ for key, values in matrix.items():
99
+ new_tasks = _resolve_matrix(new_tasks, key, values, exclude)
100
+
101
+ for new_task in new_tasks:
102
+ if set_name:
103
+ if "name" not in fields:
104
+ fields.append("name")
105
+ new_task["name"] = set_name
106
+
107
+ substitute_task_fields(
108
+ new_task,
109
+ fields,
110
+ matrix=new_task["attributes"]["matrix"],
111
+ )
112
+ yield new_task
@@ -121,7 +121,9 @@ def rewrite_when_to_optimization(config, tasks):
121
121
  files_changed = when.get("files-changed")
122
122
 
123
123
  # implicitly add task config directory.
124
- files_changed.append(f"{config.path}/**")
124
+ files_changed.append(f"{config.path}/kind.yml")
125
+ if task.get("task-from") and task["task-from"] != "kind.yml":
126
+ files_changed.append(f"{config.path}/{task['task-from']}")
125
127
 
126
128
  # "only when files changed" implies "skip if files have not changed"
127
129
  task["optimization"] = {"skip-unless-changed": files_changed}
@@ -371,7 +371,7 @@ def build_docker_worker_payload(config, task, task_def):
371
371
  if isinstance(image, dict):
372
372
  if "in-tree" in image:
373
373
  name = image["in-tree"]
374
- docker_image_task = "build-docker-image-" + image["in-tree"]
374
+ docker_image_task = "docker-image-" + image["in-tree"]
375
375
  assert "docker-image" not in task.get(
376
376
  "dependencies", ()
377
377
  ), "docker-image key in dependencies object is reserved"
@@ -4,7 +4,7 @@ from voluptuous import ALLOW_EXTRA, Any, Optional, Required
4
4
 
5
5
  from taskgraph.transforms.base import TransformSequence
6
6
  from taskgraph.util.schema import Schema
7
- from taskgraph.util.templates import deep_get, substitute
7
+ from taskgraph.util.templates import deep_get, substitute_task_fields
8
8
  from taskgraph.util.yaml import load_yaml
9
9
 
10
10
  SCHEMA = Schema(
@@ -113,12 +113,5 @@ def render_task(config, tasks):
113
113
  subs.setdefault("name", task["name"])
114
114
 
115
115
  # Now that we have our combined context, we can substitute.
116
- for field in fields:
117
- container, subfield = task, field
118
- while "." in subfield:
119
- f, subfield = subfield.split(".", 1)
120
- container = container[f]
121
-
122
- container[subfield] = substitute(container[subfield], **subs)
123
-
116
+ substitute_task_fields(task, fields, **subs)
124
117
  yield task
@@ -149,7 +149,7 @@ def stream_context_tar(topsrcdir, context_dir, out_file, image_name=None, args=N
149
149
  for f in files:
150
150
  source_path = os.path.join(root, f)
151
151
  archive_path = source_path[len(context_dir) + 1 :]
152
- archive_files[archive_path] = open(source_path, "rb")
152
+ archive_files[archive_path] = source_path
153
153
 
154
154
  # Parse Dockerfile for special syntax of extra files to include.
155
155
  content = []