Hello everyone,

For more than a decade now, we've been using a bespoke ini(ish) parser
<https://searchfox.org/mozilla-central/source/testing/mozbase/manifestparser/manifestparser/ini.py>
to process our test manifests. While it has served us well, it is time to
switch to a standard format.
We are planning to migrate all manifestparser
<https://searchfox.org/mozilla-central/source/testing/mozbase/manifestparser>
based manifests (e.g mochitest.ini, browser.ini,  xpcshell.ini, etc) to TOML
<https://toml.io/en/>. Notably, web-platform-tests and reftests use their
own manifest formats and will remain unaffected.

## Why TOML?

There are several reasons we chose TOML.

1. Standard. It is simple and widely used, parsers exist for it in every
major language.
2. Tooling. There are parsers that support round-trip comments (tomlkit
<https://github.com/sdispater/tomlkit>), which means we can finally write
tools that can edit the manifests without losing comments.
3. Performance. There are several performance optimized parsers
(implemented in Rust or C++, like rtoml
<https://github.com/samuelcolvin/rtoml>) that should give appreciable
boosts to the build backend responsible for processing manifests.
4. Familiar. If you squint, it looks close enough to the existing ini
format that it should feel somewhat familiar to developers.
5. Maintenance. We no longer need to maintain a bespoke ini parser.

## Why now?

As Firefox's CI has continued to grow in complexity, the number of test
settings (i.e a unique test configuration) and migrations (i.e, switching
the environment a test runs in) has steadily been growing as well. It's
gotten to the point where we are unable to keep up. When adding a new test
setting, or performing a migration, the most time consuming part is always
triaging tests. This process involves a ton of manual manifest editing in
order to skip all the new failures that inevitably arise.

In order to keep up with the pace of CI, we need tools to aid us. Which
means we need a way to automate the editing of manifests, which is not
possible with our current parser (without losing comments).

## How will the migration work?

The migration will be internal to manifestparser
<https://searchfox.org/mozilla-central/source/testing/mozbase/manifestparser>,
so if you maintain any tools that process our test manifests, the switch
should be completely transparent (though you may need to update to a newer
version of manifestparser if you are using it out-of-tree).

Rather than a hard cutover, there will be a transition period where both
manifest formats are supported. This will help reduce conflicts and allow
us to migrate a small subset of manifests first, and work through any
issues that arise before changing the entire tree at once.

The work is being tracked in bug 1821199
<https://bugzilla.mozilla.org/show_bug.cgi?id=1821199>. Big thanks to Tom
Marble for driving this project!

Please reach out if you have any questions or concerns.
Cheers,
Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAAJAz%2B6yHakdCMHCG83UXa6T%2BrWXiRGQm5LjOEqp7%2B9-adossQ%40mail.gmail.com.

Reply via email to