Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index tasks by git tree hash instead of parent commits hashes #25992

Merged
merged 4 commits into from Mar 20, 2020
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Remove unused task indexing by task definition hash

  • Loading branch information
SimonSapin committed Mar 19, 2020
commit 0cd734fd7a8f531f721914f990540e31485a8e2a
@@ -105,7 +105,6 @@ def mocked_only():
windows_release()
magicleap_dev()
magicleap_nightly()
decisionlib.DockerWorkerTask("Indexed by task definition").find_or_create()


ping_on_daily_task_failure = "SimonSapin, nox, emilio"
@@ -279,7 +279,7 @@ def find(index_path):
print("Found task %s indexed at %s" % (task_id, full_index_path))
return task_id

def find_or_create(self, index_path=None):
def find_or_create(self, index_path):
"""
Try to find a task in the Index and return its ID.
@@ -292,11 +292,6 @@ def find_or_create(self, index_path=None):
<https://docs.taskcluster.net/docs/reference/core/taskcluster-index/references/api#findTask>
"""
if not index_path:
worker_type = self.worker_type
index_by = json.dumps([worker_type, self.build_worker_payload()]).encode("utf-8")
index_path = "by-task-definition." + hashlib.sha256(index_by).hexdigest()

task_id = SHARED.found_or_created_indexed_tasks.get(index_path)
if task_id is not None:
return task_id
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.