Closed Bug 1710605 Opened 3 years ago Closed 3 years ago

Problems in serialization (PASS vs "PASS") causes lots of unnecessary meta data updates for wptsync bot

Categories

(Testing :: web-platform-tests, defect)

Default
defect

Tracking

(firefox91 fixed)

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: whimboo, Assigned: jgraham)

Details

Attachments

(2 files, 1 obsolete file)

As it can be seen in the history of the following file the meta data for test statuses gets updated back and forth between e.g PASS and "PASS":

https://hg.mozilla.org/mozilla-central/log/tip/testing/web-platform/meta/webdriver/tests/maximize_window/user_prompts.py.ini?patch=&linerange=2:25

This adds a lot of extra commits to these files, which makes it hard to find real changes.

Flags: needinfo?(james)

We were previously constructing some expected values as a list of
StringNode objects due to make_value_node incorrectly calling
make_node for list items. This is wrong as StringNode types can only
be on the lhs of an expression (e.g. if os == "linux") but never on
the right hand side (which is always a ValueNode or ListNode with ValueNode
children).

StringNodes are always serialized with quotes and this was causing
values to flip flop between quoted and unquoted forms in some cases.

At the same time we clean up the end of line handling when
serializing, which previously caused us to often end up with an
additional newline at the end of files.

Assignee: nobody → james
Status: NEW → ASSIGNED

I think I figured out where the bug was, but oh my goodness this code has a lot of cases :)

Flags: needinfo?(james)

We were previously constructing some expected values as a list of
StringNode objects due to make_value_node incorrectly calling
make_node for list items. This is wrong as StringNode types can only
be on the lhs of an expression (e.g. if os == "linux") but never on
the right hand side (which is always a ValueNode or ListNode with ValueNode
children).

StringNodes are always serialized with quotes and this was causing
values to flip flop between quoted and unquoted forms in some cases.

At the same time we clean up the end of line handling when
serializing, which previously caused us to often end up with an
additional newline at the end of files.

Attachment #9222240 - Attachment description: Bug 1710605 - Consistenly sewrialize list values as unquoted where possible, → Bug 1710605 - Consistenly serialize list values as unquoted where possible,
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/autoland/rev/c12ba7e19c6f
Consistenly serialize list values as unquoted where possible, r=whimboo
https://hg.mozilla.org/integration/autoland/rev/4ee05dc03d18
Don't serialize extra whitespace at the end of a meta file, r=whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/29441 for changes under testing/web-platform/tests
Attachment #9222244 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch

James, the upstream merge didn't happen yet. Could you please have a look? Thanks.

Flags: needinfo?(james)
Upstream PR was closed without merging
Upstream PR merged by jgraham
Flags: needinfo?(james)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: