Open Bug 1821199 Opened 2 years ago Updated 1 month ago

[meta] replace manifestparser .ini with .toml

Categories

(Testing :: General, task)

Default
task

Tracking

(Not tracked)

People

(Reporter: jmaher, Unassigned)

References

(Depends on 7 open bugs, Blocks 1 open bug, Regressed 1 open bug)

Details

(Keywords: meta)

Depends on: 1821201
Depends on: 1821207
Depends on: 1821209
Depends on: 1821212
Depends on: 1821217
Depends on: 1821218
Depends on: 1839831
Depends on: 1847269
Depends on: 1847271
Depends on: 1847580

I've just filed bug 1847580 which will need fixing as part of this - currently ESLint reads the test manifest .ini files to work out various details, and so that will need updating to read toml files before they ini files are made redundant/removed.

A couple more thoughts:

I'd assume that ./mach addtest will also need fixing. Though I'm not quite sure where this should be filed.

Should we add a .toml handling extension to the recommended list for VS Code (see .vscode/extensions.json)? I would assume it would give us syntax highlighting and that might make it easier to read and edit.

Depends on: 1850545
Depends on: 1851890
Depends on: 1847593, 1847587
Depends on: 1848994
Depends on: 1853223
Depends on: 1853243
Depends on: 1853244
Depends on: 1853245
Depends on: 1855295
Depends on: 1855296
Depends on: 1855298
Depends on: 1855300
Depends on: 1854701
Depends on: 1856463
Depends on: 1856530
Depends on: 1859869
Depends on: 1859873
Depends on: 1859890
Depends on: 1859893
Depends on: 1859896
Depends on: 1859899
Depends on: 1859901
Depends on: 1859905
Depends on: 1859908
Depends on: 1859911

I think each of these changes is making manifest parsing slower, and is the cause for the slow drift in time spent in configure: https://treeherder.mozilla.org/perfherder/graphs?highlightAlerts=1&highlightChangelogData=1&highlightCommonAlerts=0&series=autoland,4200695,1,2&timerange=5184000

Before this all started, we had:
Finished reading 2285 moz.build files in 4.72s

Now, we have:
Finished reading 2288 moz.build files in 23.25s

And a local python profile shows most of the time spent in read_toml.

Flags: needinfo?(tmarble)

I'll also note that bug 1779473 added tomlkit, while we already had toml, and that crudely replacing tomlkit with toml in testing/mozbase/manifestparser/manifestparser/toml.py brings down the time spent in read_toml substantially.

The choice of tomlkit over toml was intentional due to the former library's ability to edit TOML files while preserving comments (to be used in future automation).

We can use Bug 1859997 to track read_toml performance

Flags: needinfo?(tmarble)
Depends on: 1864387
Depends on: 1865697
Depends on: 1868866
Depends on: 1869204
Depends on: 1869430
Depends on: 1869590
Depends on: 1869871
Depends on: 1869890
Depends on: 1869943
Depends on: 1870536
Depends on: 1870810
Depends on: 1873105
No longer depends on: 1853762
No longer depends on: 1853759
No longer depends on: 1847269
Depends on: 1874595
Depends on: 1877527
Depends on: 1877676
See Also: → 1839831
Depends on: 1931575

Are conversions by hand, or do you have something scripted to help?

they were scripted, in general you can read/write from manifestparser, so try using that for reading the .ini and then writing out a .toml.

You need to log in before you can comment on or make changes to this bug.