Closed Bug 1384729 Opened 2 years ago Closed 2 years ago

Move actions directory into taskgraph directory

Categories

(Taskcluster :: Services, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla56

People

(Reporter: bstack, Assigned: bstack)

References

Details

Attachments

(1 file)

This will allow us to make use of more utility functions and will be cleaner in general.
Duplicate of this bug: 1381874
Comment on attachment 8890982 [details]
Bug 1384729 - Move actions into taskgraph dir

https://reviewboard.mozilla.org/r/162160/#review167512

Looks good, just a little bit to split up, if it's not too hard.

::: taskcluster/taskgraph/actions/add-new-jobs.py:5
(Diff revision 2)
> +# -*- coding: utf-8 -*-
> +
> +# This Source Code Form is subject to the terms of the Mozilla Public
> +# License, v. 2.0. If a copy of the MPL was not distributed with this
> +# file, You can obtain one at http://mozilla.org/MPL/2.0/.

Please add the `from __future__` stuff too, and in the other files that didn't have headers.

::: taskcluster/taskgraph/actions/add-new-jobs.py:41
(Diff revision 2)
>  def add_new_jobs_action(parameters, input, task_group_id, task_id, task):
> -    full_task_graph = get_artifact(task_id, "public/full-task-graph.json")
> +    decision_task_id = find_decision_task(parameters)
> +
> +    full_task_graph = get_artifact(decision_task_id, "public/full-task-graph.json")
>      _, full_task_graph = TaskGraph.from_json(full_task_graph)
> -    label_to_taskid = get_artifact(task_id, "public/label-to-taskid.json")
> +    label_to_taskid = get_artifact(decision_task_id, "public/label-to-taskid.json")

I think this fix is correcting an assumption that task_id was the decision task?  That should probably be its own commit.

::: taskcluster/taskgraph/actions/registry.py:309
(Diff revision 2)
>      the action callback in testing mode, without actually creating tasks.
>      """
>      cb = get_callbacks().get(callback, None)
>      if not cb:
> -        raise Exception('Unknown callback: {}'.format(callback))
> +        raise Exception('Unknown callback: {}. Known callbacks: {}'.format(
> +            callback, get_callbacks().keys()))

This might be best in its own commit too..
Attachment #8890982 - Flags: review?(dustin) → review+
Pushed by dmitchell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9368bd804513
Move actions into taskgraph dir r=dustin
Backout by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/078c33d62327
Backed out changeset 9368bd804513 for bustage: pattern 'actions/**' in 'taskcluster/moz.build' corresponds to no files in the tree. r=backout on a CLOSED TREE
Backout by kwierso@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/36611b4b489a
Backed out changeset 9368bd804513 for build failures in test_mozbuild_reading.py a=backout CLOSED TREE
https://hg.mozilla.org/mozilla-central/rev/453457533c95
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Component: Integration → Services
You need to log in before you can comment on or make changes to this bug.