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.
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.taskcluster.yml +6 -1
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/CHANGELOG.md +7 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/PKG-INFO +1 -1
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/index.rst +1 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/parameters.rst +3 -0
- taskcluster_taskgraph-24.8.0/docs/reference/run-task.rst +68 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/pyproject.toml +1 -1
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/run-task/run-task +216 -3
- taskcluster_taskgraph-24.8.0/taskcluster/docker/index-task/Dockerfile +14 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/index-task/package.json +2 -2
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/index-task/yarn.lock +14 -14
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_scripts_run_task.py +428 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/uv.lock +10 -10
- taskcluster_taskgraph-24.7.0/taskcluster/docker/index-task/Dockerfile +0 -11
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.codespell-ignore-words.txt +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.github/CODEOWNERS +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.github/workflows/codeql-analysis.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.github/workflows/codspeed.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.github/workflows/pypi-publish.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.gitignore +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.pre-commit-config.yaml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.readthedocs.yaml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/.yamllint +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/CODE_OF_CONDUCT.md +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/CONTRIBUTING.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/LICENSE +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/Makefile +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/README.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/index.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/kind.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/loading.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/optimization.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/overview.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/scopes.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/task-graphs.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/concepts/transforms.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/conf.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/contributing.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/glossary.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/bootstrap-taskgraph.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/create-actions.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/create-tasks.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/debugging.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/define-schemas.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/docker.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/index.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/load-task-locally.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/resolve-keyed-by.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/run-locally.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/send-notifications.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/howto/use-fetches.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/index.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/cli.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/migrations.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/optimization-strategies.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/modules.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.actions.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.loader.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.optimize.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.transforms.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.transforms.run.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/source/taskgraph.util.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/transforms/chunking.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/transforms/from_deps.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/transforms/index.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/transforms/matrix.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/reference/transforms/task_context.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/tutorials/connecting-taskcluster.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/tutorials/creating-a-task-graph.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/tutorials/example-taskcluster.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/tutorials/getting-started.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/docs/tutorials/index.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/make.bat +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/pytest-taskgraph/README.md +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/pytest-taskgraph/pyproject.toml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/pytest-taskgraph/src/pytest_taskgraph/__init__.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/pytest-taskgraph/src/pytest_taskgraph/fixtures/gen.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/pytest-taskgraph/src/pytest_taskgraph/fixtures/vcs.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/sphinx-taskgraph/README.md +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/sphinx-taskgraph/pyproject.toml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/sphinx-taskgraph/src/sphinx_taskgraph/__init__.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/packages/sphinx-taskgraph/src/sphinx_taskgraph/autoschema.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/renovate.json +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/__init__.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/__init__.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/add_new_jobs.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/cancel.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/cancel_all.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/rebuild_cached_tasks.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/registry.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/retrigger.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/actions/util.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/config.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/create.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/decision.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/docker.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/filter_tasks.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/generator.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/graph.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/loader/__init__.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/loader/default.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/loader/transform.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/main.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/morph.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/optimize/__init__.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/optimize/base.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/optimize/strategies.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/parameters.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/run-task/fetch-content +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/run-task/hgrc +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/run-task/robustcheckout.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/target_tasks.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/task.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/taskgraph.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/__init__.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/base.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/cached_tasks.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/chunking.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/code_review.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/docker_image.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/fetch.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/from_deps.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/matrix.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/notify.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/run/__init__.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/run/common.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/run/index_search.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/run/run_task.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/run/toolchain.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/task.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/transforms/task_context.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/__init__.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/archive.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/attributes.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/cached_tasks.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/caches.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/copy.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/dependencies.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/docker.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/hash.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/json.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/keyed_by.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/memory.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/parameterization.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/path.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/python_path.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/readonlydict.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/schema.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/set_name.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/shell.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/task_context.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/taskcluster.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/taskgraph.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/templates.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/time.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/treeherder.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/vcs.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/verify.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/workertypes.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/util/yaml.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/config.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/REGISTRY +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/decision/Dockerfile +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/decision/HASH +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/decision/README.md +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/decision/VERSION +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/decision/system-setup.sh +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/fetch/Dockerfile +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/image_builder/README.rst +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/index-task/README +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/index-task/insert-indexes.js +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/python/Dockerfile +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/run-task/Dockerfile +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/run-task/system-setup.sh +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/skopeo/Dockerfile +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/skopeo/policy.json +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/docker/skopeo/push_image.sh +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/check/kind.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/codecov/kind.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/complete/kind.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/doc/kind.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/docker-image/kind.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/fetch/kind.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/push-image/kind.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/test/kind.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/test/linux.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/kinds/test/windows.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/scripts/codecov-upload.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/self_taskgraph/__init__.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/self_taskgraph/custom_parameters.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/self_taskgraph/custom_target_tasks.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/self_taskgraph/transforms/add_pr_route.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/self_taskgraph/transforms/push_image.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/test/params/main-repo-pull-request-untrusted.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/test/params/main-repo-pull-request.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/test/params/main-repo-push.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/test/params/main-repo-release-pytest-taskgraph.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/taskcluster/test/params/main-repo-release-taskcluster-taskgraph.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/cookiecutter.json +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/hooks/post_gen_project.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster/config.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster/docker/linux/Dockerfile +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster/kinds/docker-image/kind.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster/kinds/hello/kind.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster/{{cookiecutter.project_slug}}_taskgraph/transforms/hello.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/template/{{cookiecutter.project_name}}/taskcluster.github.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/__init__.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/automationrelevance.json +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/conftest.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/task_context.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/config.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/docker/hello-world/Dockerfile +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/docker/hello-world-tag/Dockerfile +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/docker/hello-world-tag/REGISTRY +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/docker/hello-world-tag/VERSION +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/kinds/docker-image/kind.yml +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/scripts/toolchain/run.ps1 +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/scripts/toolchain/run.sh +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/taskcluster/test_taskgraph/transforms/foo.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/data/testmod/thing.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/mockedopen.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_actions_rebuild_cached_tasks.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_actions_registry.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_config.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_create.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_decision.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_docker.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_generator.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_graph.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_graph_perf.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_main.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_morph.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_optimize.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_optimize_strategies.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_parameters.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_scripts_fetch_content.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_target_tasks.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_taskgraph.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transform_chunking.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transform_docker_image.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transform_task_context.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_base.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_cached_tasks.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_fetch.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_from_deps.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_matrix.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_notify.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_run.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_run_run_task.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_run_toolchain.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_transforms_task.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_archive.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_attributes.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_cached_tasks.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_copy.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_dependencies.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_docker.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_json.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_keyed_by.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_memory.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_parameterization.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_path.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_python_path.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_readonlydict.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_schema.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_taskcluster.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_templates.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_time.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_treeherder.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_vcs.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_verify.py +0 -0
- {taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/test/test_util_workertypes.py +0 -0
- {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=
|
|
290
|
+
--base-rev="$TASKGRAPH_BASE_REV"
|
|
286
291
|
--head-repository='${repoUrl}'
|
|
287
292
|
--head-ref='${head_ref}'
|
|
288
293
|
--head-rev='${head_sha}'
|
|
@@ -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.
|
{taskcluster_taskgraph-24.7.0 → taskcluster_taskgraph-24.8.0}/src/taskgraph/run-task/run-task
RENAMED
|
@@ -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
|
-
|
|
41
|
-
|
|
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"]
|
|
@@ -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@
|
|
47
|
-
version "
|
|
48
|
-
resolved "https://registry.yarnpkg.com/@taskcluster/client/-/client-
|
|
49
|
-
integrity sha512
|
|
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 "^
|
|
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@^
|
|
189
|
-
version "
|
|
190
|
-
resolved "https://registry.yarnpkg.com/slugid/-/slugid-
|
|
191
|
-
integrity sha512-
|
|
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 "^
|
|
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@^
|
|
218
|
-
version "
|
|
219
|
-
resolved "https://registry.yarnpkg.com/uuid/-/uuid-
|
|
220
|
-
integrity sha512-
|
|
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==
|