Closed Bug 1611014 Opened 4 years ago Closed 4 years ago

mach taskgraph fails with schema validation error when run with --root option from commandline

Categories

(Firefox Build System :: Task Configuration, defect)

defect
Not set
normal

Tracking

(firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: rjl, Assigned: rjl)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

I'm not able to run "mach taskgraph" against the Thunderbird tree after D18376 from bug 1524639 landed.

The command varies, but typically looks like:
mach taskgraph full --root=comm/taskcluster/ci -p params.yml

The error is:

Exception: In job u'repackage-linux-shippable/opt':
extra keys not allowed @ data[u'dependencies']['build-signing']
extra keys not allowed @ data[u'fetches']['build-signing']

(note that 'build-signing' is not a Unicode string).

I tracked the problem down to https://searchfox.org/mozilla-central/rev/e878e5b81bb319c141900ce9cfcde732df5c8449/taskcluster/taskgraph/generator.py#214
for kind_name in os.listdir(self.root_dir):

When root_dir is not a unicode string, which is apparently the case when using --root-dir on the commandline, everything that os.listdir() returns is non-unicode.

This fixes an issue when running "mach taskgraph" with the --root parameter
from the commandline. We use this regularly when working on Thunderbird task
configuration.

The initial list of kind names is read with os.listdir(), which returns
non-unicode strings when given a non-unicode string. As a result, some tasks
fail to validate because there's a non-unicode string where a unicode string
is expected.

Assignee: nobody → rob
Status: NEW → ASSIGNED
Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/integration/autoland/rev/fd54a1a8bca8
Make sure Taskcluster root_dir is a unicode string. r=rstewart
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: