for new .toml files allow for comments to be on the same line with skip-if condition
Categories
(Testing :: Mozbase, task, P2)
Tracking
(firefox118 wontfix, firefox119 fixed)
People
(Reporter: jmaher, Assigned: tmarble)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
preserving comments is important for our manifests, it keeps history and state easy to find. as we switch to .toml, this can get confusing... from Matrix:
I ran into one issue that I'm sure you're aware of. I noticed you're often ending the triple quote for skip-if on the same line as the condition, e.g:
['test_docload_shutdown.html']
skip-if = '''
os == 'mac' ''' # bug 1456997
That makes sense so we know the bug is associated with that condition. But if you add another condition, it stops working:
['test_docload_shutdown.html']
skip-if = '''
os == 'mac' # bug 1456997
display == 'wayland' # bug 1234567
'''
as those are no longer comments and are part of the string.
I know you wanted to keep things working the same in manifestparser across both formats, but I'm thinking we should convert this to a list and special case toml in manifestparser :/. E.g, so we'd have:
['test_docload_shutdown.html']
skip-if = [
"os == 'mac'", # bug 1456997
"display == 'wayland'", # bug 1234567
]
I don't think it would be a huge change in manifestparser, something like:
if path.endswith("toml"):
skip_if = obj["skip-if"]
else:
skip_if = obj["skip-if"].split("\n")
expression = " || ".join(skip_if)
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
:tmarble, I will let you figure out when and how to fix this, the comments here are a realistic solution.
Assignee | ||
Comment 2•2 years ago
|
||
Based on discussion with :ahal in Firefox Testing
we have decided the approach to this bug is:
- Fixi the currently migrated TOML files with
skip-if
to a list - Update mmp to translate
skip-if
to a list - Verify that the manifestparser TOML reader will "do the right thing" (handle implicit OR as newlines and ignore comments)
Assignee | ||
Comment 3•1 years ago
|
||
Updated•1 years ago
|
Comment 5•1 years ago
|
||
bugherder |
Updated•1 years ago
|
Updated•1 years ago
|
Description
•