mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Taskcluster: Don’t attempt to write to the index from unprivileged tasks
This commit is contained in:
parent
bc366d01a8
commit
7a628080ec
3 changed files with 7 additions and 5 deletions
|
@ -38,6 +38,7 @@ class Config:
|
|||
def __init__(self):
|
||||
self.task_name_template = "%s"
|
||||
self.index_prefix = "garbage.servo-decisionlib"
|
||||
self.index_read_only = False
|
||||
self.scopes_for_all_subtasks = []
|
||||
self.routes_for_all_subtasks = []
|
||||
self.docker_image_buil_worker_type = None
|
||||
|
@ -265,8 +266,8 @@ class Task:
|
|||
except taskcluster.TaskclusterRestFailure as e:
|
||||
if e.status_code != 404: # pragma: no cover
|
||||
raise
|
||||
# FIXME: skip for untrusted tasks that don’t have the scope to do this?
|
||||
self.routes.append("index.%s.%s" % (CONFIG.index_prefix, index_path))
|
||||
if not CONFIG.index_read_only:
|
||||
self.routes.append("index.%s.%s" % (CONFIG.index_prefix, index_path))
|
||||
task_id = self.create()
|
||||
|
||||
SHARED.found_or_created_indexed_tasks[index_path] = task_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue