taskcluster-taskgraph 24.7.0__tar.gz → 24.8.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 (274) hide show
  1. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.taskcluster.yml +6 -1
  2. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/CHANGELOG.md +7 -0
  3. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/PKG-INFO +1 -1
  4. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/index.rst +1 -0
  5. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/parameters.rst +3 -0
  6. taskcluster_taskgraph-24.8.0/docs/reference/run-task.rst +68 -0
  7. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/pyproject.toml +1 -1
  8. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/run-task/run-task +216 -3
  9. taskcluster_taskgraph-24.8.0/taskcluster/docker/index-task/Dockerfile +14 -0
  10. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/index-task/package.json +2 -2
  11. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/index-task/yarn.lock +14 -14
  12. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_scripts_run_task.py +428 -0
  13. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/uv.lock +10 -10
  14. taskcluster_taskgraph-24.7.0/taskcluster/docker/index-task/Dockerfile +0 -11
  15. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.codespell-ignore-words.txt +0 -0
  16. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.github/CODEOWNERS +0 -0
  17. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.github/workflows/codeql-analysis.yml +0 -0
  18. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.github/workflows/codspeed.yml +0 -0
  19. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.github/workflows/pypi-publish.yml +0 -0
  20. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.gitignore +0 -0
  21. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.pre-commit-config.yaml +0 -0
  22. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.readthedocs.yaml +0 -0
  23. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.yamllint +0 -0
  24. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/CODE_OF_CONDUCT.md +0 -0
  25. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/CONTRIBUTING.rst +0 -0
  26. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/LICENSE +0 -0
  27. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/Makefile +0 -0
  28. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/README.rst +0 -0
  29. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/index.rst +0 -0
  30. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/kind.rst +0 -0
  31. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/loading.rst +0 -0
  32. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/optimization.rst +0 -0
  33. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/overview.rst +0 -0
  34. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/scopes.rst +0 -0
  35. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/task-graphs.rst +0 -0
  36. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/transforms.rst +0 -0
  37. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/conf.py +0 -0
  38. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/contributing.rst +0 -0
  39. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/glossary.rst +0 -0
  40. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/bootstrap-taskgraph.rst +0 -0
  41. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/create-actions.rst +0 -0
  42. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/create-tasks.rst +0 -0
  43. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/debugging.rst +0 -0
  44. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/define-schemas.rst +0 -0
  45. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/docker.rst +0 -0
  46. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/index.rst +0 -0
  47. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/load-task-locally.rst +0 -0
  48. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/resolve-keyed-by.rst +0 -0
  49. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/run-locally.rst +0 -0
  50. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/send-notifications.rst +0 -0
  51. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/use-fetches.rst +0 -0
  52. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/index.rst +0 -0
  53. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/cli.rst +0 -0
  54. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/migrations.rst +0 -0
  55. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/optimization-strategies.rst +0 -0
  56. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/modules.rst +0 -0
  57. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.actions.rst +0 -0
  58. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.loader.rst +0 -0
  59. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.optimize.rst +0 -0
  60. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.rst +0 -0
  61. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.transforms.rst +0 -0
  62. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.transforms.run.rst +0 -0
  63. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.util.rst +0 -0
  64. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/transforms/chunking.rst +0 -0
  65. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/transforms/from_deps.rst +0 -0
  66. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/transforms/index.rst +0 -0
  67. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/transforms/matrix.rst +0 -0
  68. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/transforms/task_context.rst +0 -0
  69. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/tutorials/connecting-taskcluster.rst +0 -0
  70. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/tutorials/creating-a-task-graph.rst +0 -0
  71. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/tutorials/example-taskcluster.yml +0 -0
  72. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/tutorials/getting-started.rst +0 -0
  73. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/tutorials/index.rst +0 -0
  74. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/make.bat +0 -0
  75. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/pytest-taskgraph/README.md +0 -0
  76. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/pytest-taskgraph/pyproject.toml +0 -0
  77. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/pytest-taskgraph/src/pytest_taskgraph/__init__.py +0 -0
  78. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/pytest-taskgraph/src/pytest_taskgraph/fixtures/gen.py +0 -0
  79. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/pytest-taskgraph/src/pytest_taskgraph/fixtures/vcs.py +0 -0
  80. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/sphinx-taskgraph/README.md +0 -0
  81. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/sphinx-taskgraph/pyproject.toml +0 -0
  82. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/sphinx-taskgraph/src/sphinx_taskgraph/__init__.py +0 -0
  83. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/sphinx-taskgraph/src/sphinx_taskgraph/autoschema.py +0 -0
  84. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/renovate.json +0 -0
  85. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/__init__.py +0 -0
  86. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/__init__.py +0 -0
  87. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/add_new_jobs.py +0 -0
  88. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/cancel.py +0 -0
  89. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/cancel_all.py +0 -0
  90. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/rebuild_cached_tasks.py +0 -0
  91. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/registry.py +0 -0
  92. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/retrigger.py +0 -0
  93. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/util.py +0 -0
  94. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/config.py +0 -0
  95. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/create.py +0 -0
  96. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/decision.py +0 -0
  97. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/docker.py +0 -0
  98. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/filter_tasks.py +0 -0
  99. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/generator.py +0 -0
  100. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/graph.py +0 -0
  101. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/loader/__init__.py +0 -0
  102. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/loader/default.py +0 -0
  103. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/loader/transform.py +0 -0
  104. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/main.py +0 -0
  105. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/morph.py +0 -0
  106. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/optimize/__init__.py +0 -0
  107. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/optimize/base.py +0 -0
  108. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/optimize/strategies.py +0 -0
  109. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/parameters.py +0 -0
  110. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/run-task/fetch-content +0 -0
  111. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/run-task/hgrc +0 -0
  112. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/run-task/robustcheckout.py +0 -0
  113. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/target_tasks.py +0 -0
  114. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/task.py +0 -0
  115. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/taskgraph.py +0 -0
  116. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/__init__.py +0 -0
  117. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/base.py +0 -0
  118. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/cached_tasks.py +0 -0
  119. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/chunking.py +0 -0
  120. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/code_review.py +0 -0
  121. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/docker_image.py +0 -0
  122. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/fetch.py +0 -0
  123. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/from_deps.py +0 -0
  124. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/matrix.py +0 -0
  125. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/notify.py +0 -0
  126. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/run/__init__.py +0 -0
  127. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/run/common.py +0 -0
  128. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/run/index_search.py +0 -0
  129. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/run/run_task.py +0 -0
  130. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/run/toolchain.py +0 -0
  131. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/task.py +0 -0
  132. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/task_context.py +0 -0
  133. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/__init__.py +0 -0
  134. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/archive.py +0 -0
  135. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/attributes.py +0 -0
  136. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/cached_tasks.py +0 -0
  137. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/caches.py +0 -0
  138. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/copy.py +0 -0
  139. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/dependencies.py +0 -0
  140. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/docker.py +0 -0
  141. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/hash.py +0 -0
  142. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/json.py +0 -0
  143. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/keyed_by.py +0 -0
  144. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/memory.py +0 -0
  145. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/parameterization.py +0 -0
  146. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/path.py +0 -0
  147. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/python_path.py +0 -0
  148. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/readonlydict.py +0 -0
  149. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/schema.py +0 -0
  150. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/set_name.py +0 -0
  151. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/shell.py +0 -0
  152. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/task_context.py +0 -0
  153. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/taskcluster.py +0 -0
  154. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/taskgraph.py +0 -0
  155. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/templates.py +0 -0
  156. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/time.py +0 -0
  157. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/treeherder.py +0 -0
  158. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/vcs.py +0 -0
  159. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/verify.py +0 -0
  160. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/workertypes.py +0 -0
  161. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/yaml.py +0 -0
  162. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/config.yml +0 -0
  163. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/REGISTRY +0 -0
  164. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/decision/Dockerfile +0 -0
  165. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/decision/HASH +0 -0
  166. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/decision/README.md +0 -0
  167. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/decision/VERSION +0 -0
  168. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/decision/system-setup.sh +0 -0
  169. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/fetch/Dockerfile +0 -0
  170. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/image_builder/README.rst +0 -0
  171. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/index-task/README +0 -0
  172. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/index-task/insert-indexes.js +0 -0
  173. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/python/Dockerfile +0 -0
  174. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/run-task/Dockerfile +0 -0
  175. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/run-task/system-setup.sh +0 -0
  176. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/skopeo/Dockerfile +0 -0
  177. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/skopeo/policy.json +0 -0
  178. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/skopeo/push_image.sh +0 -0
  179. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/check/kind.yml +0 -0
  180. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/codecov/kind.yml +0 -0
  181. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/complete/kind.yml +0 -0
  182. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/doc/kind.yml +0 -0
  183. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/docker-image/kind.yml +0 -0
  184. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/fetch/kind.yml +0 -0
  185. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/push-image/kind.yml +0 -0
  186. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/test/kind.yml +0 -0
  187. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/test/linux.yml +0 -0
  188. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/test/windows.yml +0 -0
  189. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/scripts/codecov-upload.py +0 -0
  190. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/self_taskgraph/__init__.py +0 -0
  191. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/self_taskgraph/custom_parameters.py +0 -0
  192. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/self_taskgraph/custom_target_tasks.py +0 -0
  193. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/self_taskgraph/transforms/add_pr_route.py +0 -0
  194. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/self_taskgraph/transforms/push_image.py +0 -0
  195. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/test/params/main-repo-pull-request-untrusted.yml +0 -0
  196. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/test/params/main-repo-pull-request.yml +0 -0
  197. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/test/params/main-repo-push.yml +0 -0
  198. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/test/params/main-repo-release-pytest-taskgraph.yml +0 -0
  199. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/test/params/main-repo-release-taskcluster-taskgraph.yml +0 -0
  200. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/cookiecutter.json +0 -0
  201. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/hooks/post_gen_project.py +0 -0
  202. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster/config.yml +0 -0
  203. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster/docker/linux/Dockerfile +0 -0
  204. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster/kinds/docker-image/kind.yml +0 -0
  205. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster/kinds/hello/kind.yml +0 -0
  206. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster/{{cookiecutter.project_slug}}_taskgraph/transforms/hello.py +0 -0
  207. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster.github.yml +0 -0
  208. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/__init__.py +0 -0
  209. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/automationrelevance.json +0 -0
  210. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/conftest.py +0 -0
  211. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/task_context.yml +0 -0
  212. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/config.yml +0 -0
  213. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/docker/hello-world/Dockerfile +0 -0
  214. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/docker/hello-world-tag/Dockerfile +0 -0
  215. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/docker/hello-world-tag/REGISTRY +0 -0
  216. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/docker/hello-world-tag/VERSION +0 -0
  217. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/kinds/docker-image/kind.yml +0 -0
  218. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/scripts/toolchain/run.ps1 +0 -0
  219. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/scripts/toolchain/run.sh +0 -0
  220. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/test_taskgraph/transforms/foo.py +0 -0
  221. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/testmod/thing.py +0 -0
  222. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/mockedopen.py +0 -0
  223. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_actions_rebuild_cached_tasks.py +0 -0
  224. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_actions_registry.py +0 -0
  225. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_config.py +0 -0
  226. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_create.py +0 -0
  227. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_decision.py +0 -0
  228. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_docker.py +0 -0
  229. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_generator.py +0 -0
  230. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_graph.py +0 -0
  231. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_graph_perf.py +0 -0
  232. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_main.py +0 -0
  233. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_morph.py +0 -0
  234. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_optimize.py +0 -0
  235. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_optimize_strategies.py +0 -0
  236. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_parameters.py +0 -0
  237. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_scripts_fetch_content.py +0 -0
  238. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_target_tasks.py +0 -0
  239. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_taskgraph.py +0 -0
  240. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transform_chunking.py +0 -0
  241. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transform_docker_image.py +0 -0
  242. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transform_task_context.py +0 -0
  243. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_base.py +0 -0
  244. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_cached_tasks.py +0 -0
  245. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_fetch.py +0 -0
  246. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_from_deps.py +0 -0
  247. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_matrix.py +0 -0
  248. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_notify.py +0 -0
  249. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_run.py +0 -0
  250. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_run_run_task.py +0 -0
  251. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_run_toolchain.py +0 -0
  252. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_task.py +0 -0
  253. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_archive.py +0 -0
  254. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_attributes.py +0 -0
  255. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_cached_tasks.py +0 -0
  256. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_copy.py +0 -0
  257. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_dependencies.py +0 -0
  258. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_docker.py +0 -0
  259. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_json.py +0 -0
  260. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_keyed_by.py +0 -0
  261. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_memory.py +0 -0
  262. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_parameterization.py +0 -0
  263. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_path.py +0 -0
  264. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_python_path.py +0 -0
  265. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_readonlydict.py +0 -0
  266. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_schema.py +0 -0
  267. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_taskcluster.py +0 -0
  268. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_templates.py +0 -0
  269. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_time.py +0 -0
  270. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_treeherder.py +0 -0
  271. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_vcs.py +0 -0
  272. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_verify.py +0 -0
  273. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_workertypes.py +0 -0
  274. {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_yaml.py +0 -0
@@ -224,6 +224,11 @@ tasks:
224
224
  TASKGRAPH_HEAD_REF: '${head_ref}'
225
225
  TASKGRAPH_HEAD_REV: '${head_sha}'
226
226
  TASKGRAPH_REPOSITORY_TYPE: git
227
+ RUN_TASK_SECRETS:
228
+ $json:
229
+ - type: github-repo-token
230
+ app: read
231
+ repo: '${baseRepoUrl}'
227
232
  REPOSITORIES: {$json: {taskgraph: Taskgraph}}
228
233
  - $if: 'isPullRequest'
229
234
  then:
@@ -282,7 +287,7 @@ tasks:
282
287
  --tasks-for='${tasks_for}'
283
288
  --base-repository='${baseRepoUrl}'
284
289
  --base-ref='${base_ref}'
285
- --base-rev='${base_sha}'
290
+ --base-rev="$TASKGRAPH_BASE_REV"
286
291
  --head-repository='${repoUrl}'
287
292
  --head-ref='${head_ref}'
288
293
  --head-rev='${head_sha}'
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## [24.8.0] - 2026-11-12
4
+
5
+ ### Added
6
+
7
+ - run-task: fetch Github repo tokens listed in `RUN_TASK_SECRETS` env
8
+ - run-task: use GitHub's compare API to fix up `<PREFIX>_BASE_REV`
9
+
3
10
  ## [24.7.0] - 2026-11-06
4
11
 
5
12
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: taskcluster-taskgraph
3
- Version: 24.7.0
3
+ Version: 24.8.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
@@ -6,6 +6,7 @@ Reference
6
6
 
7
7
  cli
8
8
  parameters
9
+ run-task
9
10
  transforms/index
10
11
  optimization-strategies
11
12
  source/modules
@@ -28,6 +28,9 @@ base_rev
28
28
  ~~~~~~~~
29
29
  The previous revision before ``head_rev`` got merged into. This can be a short revision string.
30
30
 
31
+ For ``github-push`` and ``github-pull-request`` tasks_for, ``run-task`` can replace the
32
+ reported base with the merge base. See :ref:`run-task-base-revisions`.
33
+
31
34
  head_rev
32
35
  ~~~~~~~~
33
36
  The revision to check out, this can be a short revision string.
@@ -0,0 +1,68 @@
1
+ run-task
2
+ ========
3
+
4
+ `run-task`_ is a script in the Docker images provided by Taskgraph. It wraps a
5
+ task's command and handles setup such as cloning repositories, fetching
6
+ artifacts and installing Python requirements.
7
+
8
+ .. _run-task: https://github.com/taskcluster/taskgraph/blob/main/src/taskgraph/run-task/run-task
9
+
10
+ .. _run-task-secrets:
11
+
12
+ Secrets
13
+ -------
14
+
15
+ ``run-task`` can fetch secrets before it clones anything, so the checkout and
16
+ the task can both use them. List them as JSON in ``RUN_TASK_SECRETS``:
17
+
18
+ .. code-block:: yaml
19
+
20
+ payload:
21
+ env:
22
+ RUN_TASK_SECRETS:
23
+ $json:
24
+ - type: github-repo-token
25
+ app: read
26
+ repo: https://github.com/myorg/myrepo
27
+
28
+ The only type so far is ``github-repo-token``. It asks Taskcluster's auth service
29
+ for an installation token of the GitHub App ``app``, scoped to ``repo``. Its
30
+ keys are:
31
+
32
+ ``app`` (required)
33
+ The name of the GitHub App registered with Taskcluster.
34
+ ``repo`` (required)
35
+ The GitHub repository the token is for.
36
+ ``permissions``
37
+ The token's permissions. Defaults to ``{"contents": "read"}``.
38
+ ``env``
39
+ The environment variable to export the token in. Defaults to
40
+ ``GITHUB_TOKEN``. A variable that is already set is never replaced.
41
+
42
+ ``run-task`` also keeps the token for its own GitHub requests. The task needs
43
+ the ``taskclusterProxy`` feature and an
44
+ ``auth:github-repo-token:<app>/<owner>/<repo>:<permission>:<level>`` scope for
45
+ each permission. If a request fails, for example because a pull request from a
46
+ fork lacks the scope, ``run-task`` logs a warning and carries on without the
47
+ token. The same happens when the auth service rejects the request, such as for
48
+ an unknown ``app`` or invalid ``permissions``. Invalid JSON, an unknown ``type``
49
+ or key, or a ``repo`` that isn't on GitHub fails the task. Installation tokens
50
+ expire after an hour.
51
+
52
+ .. _run-task-base-revisions:
53
+
54
+ GitHub base revisions
55
+ ---------------------
56
+
57
+ GitHub often reports the wrong base revision: the null revision for a new
58
+ branch, the orphaned old tip for a force push, and the target's current tip for
59
+ a pull request. For a GitHub git checkout that sets ``<PREFIX>_HEAD_REV`` and
60
+ either ``<PREFIX>_BASE_REV`` or ``<PREFIX>_BASE_REF``, ``run-task`` uses GitHub's
61
+ compare API to find the right base. It then fetches that commit and exports it
62
+ as ``<PREFIX>_BASE_REV``. The requests are authenticated with a
63
+ ``github-repo-token`` for the repository from :ref:`run-task-secrets` if there
64
+ is one, or else with ``GITHUB_TOKEN`` if it is set. If the lookup fails, the
65
+ reported base is kept.
66
+
67
+ Every task that sets ``<PREFIX>_BASE_REV`` or ``<PREFIX>_BASE_REF`` on a GitHub
68
+ repository makes these compare requests implicitly.
@@ -1,7 +1,7 @@
1
1
  ### Project
2
2
  [project]
3
3
  name = "taskcluster-taskgraph"
4
- version = "24.7.0"
4
+ version = "24.8.0"
5
5
  description = "Build taskcluster taskgraphs"
6
6
  readme = "README.rst"
7
7
  authors = [
@@ -33,13 +33,15 @@ import threading
33
33
  import time
34
34
  import traceback
35
35
  import urllib.error
36
+ import urllib.parse
36
37
  import urllib.request
37
38
  from pathlib import Path
38
39
  from typing import Dict, List, Literal, NamedTuple, Optional
39
40
 
40
- SECRET_BASEURL_TPL = "{}/secrets/v1/secret/{{}}".format(
41
- os.environ.get("TASKCLUSTER_PROXY_URL", "http://taskcluster").rstrip("/")
42
- )
41
+ TASKCLUSTER_PROXY_URL = os.environ.get(
42
+ "TASKCLUSTER_PROXY_URL", "http://taskcluster"
43
+ ).rstrip("/")
44
+ SECRET_BASEURL_TPL = TASKCLUSTER_PROXY_URL + "/secrets/v1/secret/{}"
43
45
 
44
46
  GITHUB_SSH_FINGERPRINT = (
45
47
  b"github.com ssh-ed25519 "
@@ -1156,6 +1158,182 @@ def git_checkout(
1156
1158
  return commit_hash
1157
1159
 
1158
1160
 
1161
+ def _github_owner_repo(url):
1162
+ """Return the owner and repository for a github.com HTTPS or SSH URL."""
1163
+ match = re.fullmatch(
1164
+ r"(?:https?://github\.com/|ssh://git@github\.com/|git@github\.com:)"
1165
+ r"([^/]+)/([^/]+?)(?:\.git)?/?",
1166
+ url or "",
1167
+ )
1168
+ return match.groups() if match else None
1169
+
1170
+
1171
+ # GitHub tokens minted from RUN_TASK_SECRETS, keyed by lowercase (owner, repo),
1172
+ # so run-task can authenticate its own GitHub requests wherever the task asked
1173
+ # for the token to go.
1174
+ GITHUB_TOKENS: Dict[tuple, str] = {}
1175
+
1176
+
1177
+ def fetch_github_token(app, owner, repo, permissions):
1178
+ """Request a GitHub installation token through the task proxy."""
1179
+ request = urllib.request.Request(
1180
+ f"{TASKCLUSTER_PROXY_URL}/api/auth/v1/github/{app}/{owner}/repo-token",
1181
+ data=json.dumps({"repositories": [repo], "permissions": permissions}).encode(
1182
+ "utf-8"
1183
+ ),
1184
+ headers={"Content-Type": "application/json"},
1185
+ method="POST",
1186
+ )
1187
+ try:
1188
+ with urllib.request.urlopen(request, timeout=10) as response:
1189
+ return json.load(response)["token"]
1190
+ except (urllib.error.URLError, OSError, ValueError, KeyError, TypeError):
1191
+ print_line(
1192
+ b"secrets",
1193
+ b"warning: unable to retrieve GitHub token; continuing unauthenticated\n",
1194
+ )
1195
+ return None
1196
+
1197
+
1198
+ def fetch_secrets():
1199
+ """Fetch the secrets listed in RUN_TASK_SECRETS and export them."""
1200
+ if not (raw := os.environ.get("RUN_TASK_SECRETS")):
1201
+ return
1202
+ try:
1203
+ entries = json.loads(raw)
1204
+ except ValueError as e:
1205
+ raise RuntimeError(f"RUN_TASK_SECRETS is not valid JSON: {e}") from None
1206
+ if not isinstance(entries, list) or not all(isinstance(e, dict) for e in entries):
1207
+ raise RuntimeError("RUN_TASK_SECRETS must be a JSON list of objects")
1208
+
1209
+ for entry in entries:
1210
+ if entry.get("type") == "github-repo-token":
1211
+ unknown = set(entry) - {"type", "app", "repo", "permissions", "env"}
1212
+ if unknown:
1213
+ raise RuntimeError(f"RUN_TASK_SECRETS: unknown keys {sorted(unknown)}")
1214
+
1215
+ repo = entry.get("repo")
1216
+ github_repo = isinstance(repo, str) and _github_owner_repo(repo)
1217
+ if not github_repo:
1218
+ raise RuntimeError("RUN_TASK_SECRETS: 'repo' must be a GitHub repository")
1219
+
1220
+ owner, name = github_repo
1221
+ envvar = entry.get("env", "GITHUB_TOKEN")
1222
+ token = fetch_github_token(
1223
+ entry.get("app"),
1224
+ owner,
1225
+ name,
1226
+ entry.get("permissions", {"contents": "read"}),
1227
+ )
1228
+ if not token:
1229
+ continue
1230
+ GITHUB_TOKENS.setdefault((owner.lower(), name.lower()), token)
1231
+ print_line(
1232
+ b"secrets", f"fetched github-repo-token for {owner}/{name}\n".encode()
1233
+ )
1234
+ if envvar in os.environ:
1235
+ print_line(
1236
+ b"secrets",
1237
+ f"{envvar} is already set; not replacing it\n".encode(),
1238
+ )
1239
+ else:
1240
+ os.environ[envvar] = token
1241
+ else:
1242
+ raise RuntimeError(
1243
+ f"RUN_TASK_SECRETS: unsupported type {entry.get('type')!r}"
1244
+ )
1245
+
1246
+
1247
+ def github_compare(owner, repo, base, head):
1248
+ """Return GitHub's comparison status and merge base, or None on failure."""
1249
+ base = urllib.parse.quote(base, safe="")
1250
+ head = urllib.parse.quote(head, safe="")
1251
+ request = urllib.request.Request(
1252
+ f"https://api.github.com/repos/{owner}/{repo}/compare/{base}...{head}?per_page=1"
1253
+ )
1254
+ # Prefer a token minted for this repository from RUN_TASK_SECRETS, wherever
1255
+ # it was exported to, then one the task provides.
1256
+ token = GITHUB_TOKENS.get((owner.lower(), repo.lower())) or os.environ.get(
1257
+ "GITHUB_TOKEN"
1258
+ )
1259
+ if token:
1260
+ request.add_header("Authorization", f"Bearer {token}")
1261
+ try:
1262
+ with urllib.request.urlopen(request, timeout=10) as response:
1263
+ comparison = json.load(response)
1264
+ status = comparison["status"]
1265
+ merge_base = comparison["merge_base_commit"]["sha"]
1266
+ if status not in (
1267
+ "ahead",
1268
+ "behind",
1269
+ "diverged",
1270
+ "identical",
1271
+ ) or not re.fullmatch(r"[a-f0-9]{40}", merge_base):
1272
+ raise ValueError("Invalid GitHub comparison")
1273
+ return status, merge_base
1274
+ except (urllib.error.URLError, OSError, ValueError, KeyError, TypeError):
1275
+ print_line(
1276
+ b"vcs",
1277
+ b"warning: GitHub comparison failed; keeping reported base revision\n",
1278
+ )
1279
+ return None
1280
+
1281
+
1282
+ def _default_branch(repo_url):
1283
+ """Resolve the remote's default branch without a GitHub API request."""
1284
+ try:
1285
+ output = subprocess.check_output(
1286
+ ["git", "ls-remote", "--symref", repo_url, "HEAD"],
1287
+ universal_newlines=True,
1288
+ timeout=60,
1289
+ )
1290
+ match = re.search(r"ref:\s+refs/heads/(?P<branch_name>\S+)\s+HEAD", output)
1291
+ if match:
1292
+ return match.group("branch_name")
1293
+ except (OSError, subprocess.SubprocessError):
1294
+ pass
1295
+ print_line(
1296
+ b"vcs",
1297
+ b"warning: unable to resolve default branch; keeping reported base revision\n",
1298
+ )
1299
+ return None
1300
+
1301
+
1302
+ def derive_base_rev(
1303
+ github_repo, base_repo, head_repo, base_rev, base_ref, head_ref, head_rev
1304
+ ):
1305
+ """Find the base of the pushed or proposed changes using GitHub comparisons.
1306
+
1307
+ ``github_repo`` is the ``(owner, name)`` of the repository to compare in.
1308
+ """
1309
+ if head_ref and head_ref.startswith("refs/tags/"):
1310
+ return None
1311
+
1312
+ comparison = None
1313
+ if base_rev and base_rev != NULL_REVISION:
1314
+ comparison = github_compare(*github_repo, base_rev, head_rev)
1315
+ if comparison is None or comparison[0] in ("ahead", "identical"):
1316
+ return None
1317
+
1318
+ same_repo = base_repo == head_repo
1319
+ target = base_ref
1320
+ if target and not (same_repo and shortref(target) == shortref(head_ref or "")):
1321
+ # The reported base is the tip of base_ref, as for a pull request, so
1322
+ # the comparison above already found the merge base with the target.
1323
+ if comparison:
1324
+ return comparison[1]
1325
+ else:
1326
+ target = _default_branch(base_repo or head_repo)
1327
+ if not target:
1328
+ return None
1329
+
1330
+ if same_repo and shortref(target) == shortref(head_ref or ""):
1331
+ return comparison[1] if comparison else None
1332
+
1333
+ comparison = github_compare(*github_repo, target, head_rev)
1334
+ return comparison[1] if comparison else None
1335
+
1336
+
1159
1337
  def fetch_ssh_secret(secret_name):
1160
1338
  """Retrieves the private ssh key, and returns it as a StringIO object"""
1161
1339
  secret_url = SECRET_BASEURL_TPL.format(secret_name)
@@ -1313,6 +1491,9 @@ def collect_vcs_options(args, project, name):
1313
1491
  repo_type = os.environ.get(f"{env_prefix}_REPOSITORY_TYPE")
1314
1492
  base_repo = os.environ.get(f"{env_prefix}_BASE_REPOSITORY")
1315
1493
  base_rev = os.environ.get(f"{env_prefix}_BASE_REV")
1494
+ # Only used to pick the branch to compare against when deriving base_rev.
1495
+ # base_ref is deliberately never fetched or checked out.
1496
+ base_ref = os.environ.get(f"{env_prefix}_BASE_REF")
1316
1497
  head_repo = os.environ.get(f"{env_prefix}_HEAD_REPOSITORY")
1317
1498
  head_ref = os.environ.get(f"{env_prefix}_HEAD_REF")
1318
1499
  head_rev = os.environ.get(f"{env_prefix}_HEAD_REV")
@@ -1344,6 +1525,7 @@ def collect_vcs_options(args, project, name):
1344
1525
  "checkout": checkout,
1345
1526
  "base-repo": base_repo,
1346
1527
  "base-rev": base_rev,
1528
+ "base-ref": base_ref,
1347
1529
  "head-repo": head_repo,
1348
1530
  "head-ref": head_ref,
1349
1531
  "head-rev": head_rev,
@@ -1367,6 +1549,32 @@ def vcs_checkout_from_args(options):
1367
1549
  )
1368
1550
  return
1369
1551
 
1552
+ github_repo = _github_owner_repo(options["base-repo"]) or _github_owner_repo(
1553
+ options["head-repo"]
1554
+ )
1555
+ derive_base = (
1556
+ options["repo-type"] == "git"
1557
+ and github_repo
1558
+ and options["head-rev"]
1559
+ and (options["base-rev"] or options.get("base-ref"))
1560
+ )
1561
+ if derive_base:
1562
+ base_rev = derive_base_rev(
1563
+ github_repo,
1564
+ options["base-repo"],
1565
+ options["head-repo"],
1566
+ options["base-rev"],
1567
+ options.get("base-ref"),
1568
+ options["head-ref"],
1569
+ options["head-rev"],
1570
+ )
1571
+ if base_rev:
1572
+ print_line(
1573
+ b"vcs",
1574
+ f"derived base revision: {options['base-rev']} -> {base_rev}\n".encode(),
1575
+ )
1576
+ options["base-rev"] = base_rev
1577
+
1370
1578
  head_ref = options["head-ref"]
1371
1579
  head_rev = options["head-rev"]
1372
1580
  ssh_key_file = None
@@ -1438,6 +1646,8 @@ def vcs_checkout_from_args(options):
1438
1646
  pass
1439
1647
 
1440
1648
  os.environ["{}_HEAD_REV".format(options["env-prefix"])] = revision
1649
+ if derive_base:
1650
+ os.environ[f"{options['env-prefix']}_BASE_REV"] = options["base-rev"] or ""
1441
1651
 
1442
1652
 
1443
1653
  def install_pip_requirements(repositories):
@@ -1720,6 +1930,9 @@ def main(args):
1720
1930
  os.setresgid(gid, gid, gid)
1721
1931
  os.setresuid(uid, uid, uid)
1722
1932
 
1933
+ # Fetch secrets before checkout, so the checkout can use them.
1934
+ fetch_secrets()
1935
+
1723
1936
  if hook_path := os.environ.get("RUN_TASK_STARTUP_HOOK"):
1724
1937
  run_python_script(hook_path)
1725
1938
 
@@ -0,0 +1,14 @@
1
+ FROM node:26-alpine@sha256:8996bb5821d62a8fd9bb27c1cb07462f3fdce6e47d640c6a881ead0b064ce216
2
+
3
+ ENV NODE_ENV production
4
+ RUN mkdir /app
5
+ ADD insert-indexes.js /app/
6
+ ADD package.json /app/
7
+ ADD yarn.lock /app/
8
+ WORKDIR /app
9
+ RUN apk add --no-cache yarn && \
10
+ yarn --frozen-lockfile && \
11
+ yarn cache clean && \
12
+ apk del yarn
13
+
14
+ ENTRYPOINT ["node"]
@@ -5,9 +5,9 @@
5
5
  "start": "node index.js"
6
6
  },
7
7
  "dependencies": {
8
- "@taskcluster/client": "114.0.0"
8
+ "@taskcluster/client": "115.0.1"
9
9
  },
10
10
  "engines": {
11
- "node": "^24"
11
+ "node": "^26"
12
12
  }
13
13
  }
@@ -43,16 +43,16 @@
43
43
  resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-8.1.0.tgz#00d7b9dc92664550fe933cdcfaa8665bc4111202"
44
44
  integrity sha512-2SX/1jW6CIMAiebvVv5ZInoCEuWQmMyBoJXXGC6Vjakjp/fpxP5eHs7/V6WKuPEIbuK06+VpjH+vjLQhr98rDQ==
45
45
 
46
- "@taskcluster/client@114.0.0":
47
- version "114.0.0"
48
- resolved "https://registry.yarnpkg.com/@taskcluster/client/-/client-114.0.0.tgz#b6b90791b01188f6144472859a5ee2f240e04ea5"
49
- integrity sha512-o4i56pa00B90GYfQ6B/jDBmPmSm+nRYKeW+NYEbxOiTlnhL+sPO7GH9bp6viUXIRHqbv916FzD9ggLi4IrnbrQ==
46
+ "@taskcluster/client@115.0.1":
47
+ version "115.0.1"
48
+ resolved "https://registry.yarnpkg.com/@taskcluster/client/-/client-115.0.1.tgz#857ff13fd1045827dd029b79c92d361fbfaf892b"
49
+ integrity sha512-/ViqlfD3WFL/R1ZNQ9zsjzifimsDlUtX6k2cSlbRdLtJu4i/LNZv/n++ZhnGmyswnEbqYru4iAmF/s+lzAuWpg==
50
50
  dependencies:
51
51
  debug "^4.1.1"
52
52
  got "^16.0.0"
53
53
  hawk "^9.0.1"
54
54
  lodash "^4.17.4"
55
- slugid "^5.0.1"
55
+ slugid "^6.0.0"
56
56
  taskcluster-lib-urls "^13.0.0"
57
57
 
58
58
  "@types/http-cache-semantics@^4.2.0":
@@ -185,12 +185,12 @@ responselike@^4.0.2:
185
185
  dependencies:
186
186
  lowercase-keys "^3.0.0"
187
187
 
188
- slugid@^5.0.1:
189
- version "5.0.1"
190
- resolved "https://registry.yarnpkg.com/slugid/-/slugid-5.0.1.tgz#850c1834de6c2f3e4614836a30c38287e2244457"
191
- integrity sha512-T1QJB+kML/DmjdrX+RjeowCzvbjfwzJEw6bam1ft+yUv+h9/RwAfMpoXqCjxuItrGN7CgtYW/0tMp+UEIZmx4Q==
188
+ slugid@^6.0.0:
189
+ version "6.0.0"
190
+ resolved "https://registry.yarnpkg.com/slugid/-/slugid-6.0.0.tgz#05515e5cb243f9ecd1300033f070282fe4cdb346"
191
+ integrity sha512-lcFf9zUXRbdTOVb142GGjd/QoIvFiIS/uFsep11gqz/sQcDpCh2+pCfmB5FlFXDeNHHY3O/b5/qV8VaXIuLhyA==
192
192
  dependencies:
193
- uuid "^9.0.0"
193
+ uuid "^14.0.3"
194
194
 
195
195
  tagged-tag@^1.0.0:
196
196
  version "1.0.0"
@@ -214,7 +214,7 @@ uint8array-extras@^1.6.0:
214
214
  resolved "https://registry.yarnpkg.com/uint8array-extras/-/uint8array-extras-1.6.0.tgz#ab895526255bddd698e75a02992ee73f1b112ebe"
215
215
  integrity sha512-8iAasVS4wUx0gPLjH8Xtz2PeDzTSiy8QiLGu2DT3X5GU+egFEQhpnbtkehbAwjvDcxIERmCYcysiODFmE3Ud0Q==
216
216
 
217
- uuid@^9.0.0:
218
- version "9.0.1"
219
- resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30"
220
- integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==
217
+ uuid@^14.0.3:
218
+ version "14.0.3"
219
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-14.0.3.tgz#48c9b0dcf5a42d983c23162399eeb9af8b2cc617"
220
+ integrity sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw==