Closed Bug 1395717 Opened 8 years ago Closed 8 years ago

Use 'jobs-from' filename in the label for source-test tasks

Categories

(Firefox Build System :: Task Configuration, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla57

People

(Reporter: ahal, Assigned: ahal)

Details

Attachments

(1 file)

I'd like the filename of the jobs-from config (e.g, mozlint.yml, python-tests.yml, doc.yml, etc) to show up in the final task label (sans extension). This will make it much easier to select all tasks within a file with |mach try fuzzy|. Currently if you want to run all "python-test" tasks, you need to remember what's defined in python-tests.yml and hunt them all down manually. With this change we could just run: ./mach try fuzzy -q "'python-test" It might make sense for these filenames to be part of the label in other types of tasks too, but for now let's just limit it to source-test.
Comment on attachment 8903316 [details] Bug 1395717 - Use filename source-test tasks are defined in as part of their label, https://reviewboard.mozilla.org/r/175108/#review180544 If this could just be a key in the job dictionary, I'd prefer that.. ::: taskcluster/taskgraph/loader/transform.py:44 (Diff revision 1) > > + for filename in config.get('jobs-from', []): > + for name, job in load_yaml(path, filename).iteritems(): > + if defaults: > + job = merge(defaults, job) > + job.setdefault('attributes', {})['from'] = filename Why not just `job['job-from'] = filename` here? Why does this need to be an attribute?
Sure that's fine. I was mostly just trying to avoid updating all the schemas :p (and attributes looked like they contained similar types of information)
Comment on attachment 8903316 [details] Bug 1395717 - Use filename source-test tasks are defined in as part of their label, https://reviewboard.mozilla.org/r/175108/#review181412 ::: taskcluster/taskgraph/loader/transform.py:37 (Diff revision 2) > - jobs_from = itertools.chain.from_iterable( > - load_yaml(path, filename).iteritems() > - for filename in config.get('jobs-from', {})) > - for name, job in itertools.chain(jobs, jobs_from): > if defaults: > job = merge(defaults, job) Shouldn't this have `job-from` too?
Attachment #8903316 - Flags: review?(dustin) → review+
Comment on attachment 8903316 [details] Bug 1395717 - Use filename source-test tasks are defined in as part of their label, https://reviewboard.mozilla.org/r/175108/#review181412 > Shouldn't this have `job-from` too? Yeah, I suppose so. Should it just be `kind.yml`? Is that guaranteed to be the name of the file?
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f366810cead4 Use filename source-test tasks are defined in as part of their label, r=dustin
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Product: TaskCluster → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: