Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

Integrate with new results receiver #566

Closed
wants to merge 6 commits into from

Conversation

jugglinmike
Copy link
Collaborator

@rwaldron @Hexcles GitHub doesn't recognize the renames here, but I did this in two commits, so the change set should be easier to digest by viewing those individually.

The new CLI and code uses the property names from the WPT CLI's report. This is a little inconsistent with the "legacy" upload script, but I figured it would be more consistent in the long run.

This is intended to resolve gh-565

A new report receiver has been implemented. It will be integrated with
this project in a future commit. Both systems will be integrated on a
temporary basis. Clearly designate the code for the deprecated receiver
in order to limit confusion during this transitional phase.
@jugglinmike jugglinmike requested review from rwaldron and Hexcles May 31, 2018 00:12
Copy link
Member

@Hexcles Hexcles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, MIke! Looks like we will be able to remove quite a lot of code later, which is awesome! Git doesn't have great rename detection. You might want to postpone the "_legacy" renaming to a later PR for a cleaner history, but it's up to you.

I just have one concern regarding Sauce Labs.

assert isinstance(data['run_info'], object)
for name in (u'product', 'browser_version', 'os', 'os_version'):
if name not in report['run_info']:
report['run_info'][name] = platform_info[name]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not be correct.

I suspect Sauce runs do have 'product' (or maybe even other fields), but the wrong values (e.g. product=sauce, os=[client os]). Can you get a sample wptreport from a Sauce run? (Doesn't need to be the consolidated version; each shard should also have run_info.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. The metadata is present and incorrect. Here's the report generated for a test run in Apple Safari via Sauce Labs:

{
    "results": [
        {
            "message": "/infrastructure/assumptions/ahem.html d4a5ec8885c67c8491d08fa7b04268aba6a19480\n/infrastructure/assumptions/ahem-ref.html ba37c5363f2183149d7267dec4446634846b4721\nTesting d4a5ec8885c67c8491d08fa7b04268aba6a19480 == ba37c5363f2183149d7267dec4446634846b4721",
            "status": "FAIL",
            "subtests": [],
            "test": "/infrastructure/assumptions/ahem.html"
        }
    ],
    "run_info": {
        "bits": 64,
        "debug": false,
        "has_sandbox": true,
        "linux_distro": "Ubuntu",
        "os": "linux",
        "os_version": "16.04",
        "processor": "x86_64",
        "product": "sauce",
        "revision": "8c8238ca96f913c1b90f838def7f9cf0253c0113",
        "version": "Ubuntu 16.04"
    },
    "time_end": 1527784288550,
    "time_start": 1527784271236
}

You've already offered to change this in WPT, but I'd be glad to do it as
well.

Know that the build process is already aware of whether this report comes from
a Sauce-Labs-mediated browser. That means we have the information necessary to
address this without an upstream change. We should improve the WPT CLI
regardless, but that might take some time. If there's urgency here, I could
get this working by the end of the day.

Let me know how you'd like to proceed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot the link for "You've already offered to change this in WPT": web-platform-tests/wpt.fyi#208 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jugglinmike let's override the metadata for all Sauce runs and Sauce runs only (instead of filling in missing fields, which would also hide issues in Firefox/Chrome metadata that are supposed to be correct).

@jugglinmike
Copy link
Collaborator Author

@Hexcles The latest commit introduces an option named --override-platform which explicitly causes the platform information to be inserted into the generated report.

Copy link
Member

@Hexcles Hexcles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disclaimer: I'm not exactly familiar with BuildBot.

But the PR LGTM.

report['run_info'][name] = platform_info[name]
if platform_override is not None:
for name in platform_override:
report['run_info'][name] = platform_override[name]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: you could drop is not None. Empty dict/lists are safe to be skipped, too.

And perhaps simply report['run_info'].update(platform_override)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better!

@jugglinmike
Copy link
Collaborator Author

Thanks for the review, @Hexcles! It's good to get a reality check, even if it's only cursory. And don't sell yourself short--you found a critical mistake.

Anyway, I had hoped to deploy this today, but due to an earlier interruption in the collection process, we're a bit behind schedule for Edge results. Deploying this change will invalidate that collection, so I'd rather defer. Instead of deploying new code on a Friday, I'd like to target Monday morning--will that work for you?

@Hexcles
Copy link
Member

Hexcles commented Jun 1, 2018

Thanks! Sure, Monday SGTM. Deploying on Friday is the recipe to kill an otherwise great weekend :)

@jugglinmike
Copy link
Collaborator Author

Squashed and merged to master at the following commits:

  • f5d090b Integrate with new results receiver
  • 7e3c53f Reflect receiver's deprecated status in code

@jugglinmike jugglinmike closed this Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upload WPT report to staging.wpt.fyi
2 participants