[manifestparser] Always error on duplicate keys
Categories
(Testing :: Mozbase, enhancement)
Tracking
(firefox71 fixed)
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: ahal, Assigned: ahal)
Details
Attachments
(1 file)
If you pass strict=True
manifestparser will error if you specify the same key twice:
https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/testing/mozbase/manifestparser/manifestparser/ini.py#130
However in the event of duplicate keys, manifestparser will simply overwrite one of the values. So anytime this case happens it's basically an error and we should be loud about it.
More generally, we should probably just use strict mode all the time. But it's a lot easier to update manifestparser than all its consumers, and in this case the change should be very uncontroversial.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
This might be tricky to land as any dupes in the wild will error and trying to find them all on try will be tricky. I have a sample-suites
try run going. If that looks good I'll go ahead and land, though expect this will have a relatively high risk of backout.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Try run looked green:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7a531fcb0cc074ac3584261528cc4bedb88356f5
So I guess I'll just get review, land and see what happens.
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8eb11e5adfe1 [mozbase] Make manifestparser fail on duplicate keys even without strict mode r=gbrown
Comment 5•5 years ago
|
||
bugherder |
Description
•