Skip to content

Commit a32d08c

Browse files
committed
Revert "Let generic-worker verify run-task/fetch-content integrity (taskcluster#666)"
This causes failures because not all tasks have a direct dependency on the decision task, but generic-worker insists on that dependency existing when mounting an artifact from a task. So go back to mounting by url. This reverts commit f85ff32.
1 parent 490c57a commit a32d08c

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

src/taskgraph/transforms/run/run_task.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
"""
77

88
import dataclasses
9-
import hashlib
109
import os
11-
from pathlib import Path
1210

1311
from voluptuous import Any, Optional, Required
1412

@@ -27,9 +25,6 @@
2725
"powershell": ["powershell.exe", "-ExecutionPolicy", "Bypass"],
2826
}
2927

30-
RUN_TASK_PATH = Path(__file__).parent.parent.parent / "run-task" / "run-task"
31-
FETCH_CONTENT_PATH = Path(__file__).parent.parent.parent / "run-task" / "fetch-content"
32-
3328
run_task_schema = Schema(
3429
{
3530
Required("using"): "run-task",
@@ -174,14 +169,10 @@ def generic_worker_run_task(config, task, taskdesc):
174169
common_setup(config, task, taskdesc, command)
175170

176171
worker.setdefault("mounts", [])
177-
run_task_sha256 = hashlib.sha256(RUN_TASK_PATH.read_bytes()).hexdigest()
178-
fetch_content_sha256 = hashlib.sha256(FETCH_CONTENT_PATH.read_bytes()).hexdigest()
179172
worker["mounts"].append(
180173
{
181174
"content": {
182-
"taskId": {"task-reference": "<decision>"},
183-
"artifact": "public/run-task",
184-
"sha256": run_task_sha256,
175+
"url": script_url(config, "run-task"),
185176
},
186177
"file": "./run-task",
187178
}
@@ -190,9 +181,7 @@ def generic_worker_run_task(config, task, taskdesc):
190181
worker["mounts"].append(
191182
{
192183
"content": {
193-
"taskId": {"task-reference": "<decision>"},
194-
"artifact": "public/fetch-content",
195-
"sha256": fetch_content_sha256,
184+
"url": script_url(config, "fetch-content"),
196185
},
197186
"file": "./fetch-content",
198187
}

test/test_transforms_run_run_task.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ def assert_generic_worker(task):
121121
{"cache-name": "checkouts", "directory": "build"},
122122
{
123123
"content": {
124-
"artifact": "public/run-task",
125-
"sha256": "581ca6876fac84fa2dd8e8c2c18677d790890e9675229fd34c912c937ae19fae",
126-
"taskId": {"task-reference": "<decision>"},
124+
"url": "https://tc-tests.localhost/api/queue/v1/task/<TASK_ID>/artifacts/public/run-task"
127125
},
128126
"file": "./run-task",
129127
},

0 commit comments

Comments
 (0)