Page MenuHomePhabricator

URL that breaks WebPageTest API
Closed, ResolvedPublic

Description

There's something strange going with:
https://pt.m.wikipedia.org/wiki/Brasil
https://pt.m.wikipedia.org/wiki/Brasil?mobileaction=beta

that I pushed today to Jenkins. I checked locally first but I was sloppy, I only checked the result in our WebPageTest instance, I didn't verify the result in the API. What happens now is that we get errors like this:

Failing test: [TypeError: Cannot read property 'summary' of undefined]

I debugged it and the problem is that the WebPageTest API gives us an empty JSON object instead of the WebPageTest JSON. It only happens for these URLs. I added a catch also for errors (missed that before) but the API actually returns an empty JSON. When I look at the result pages on http://wpt.wmftest.org/ the runs looks perfectly fine.

I'll just do a test test with a unwrapped version of the WPT API just to verify that's not wrong in our code. I'll also add some cleaners checks in our code so we handle this better. Plus try to find out the root cause.

Event Timeline

Ok, this a new kind of error: I tested using the WebPageTest API directly to make sure something isn't wrong in our code. Testing with WebPageTest.org works fine, we got the JSON. Switching to our instance we just got an empty page/JSON. But the test run looks good on our instance.

I'll submit a issue at Github later today and update the task.

Change 272962 had a related patch set uploaded (by Phedenskog):
Handle empty results from WebPageTest

https://gerrit.wikimedia.org/r/272962

Change 274662 had a related patch set uploaded (by Phedenskog):
Move non-working Amazon tests to wpt.org

https://gerrit.wikimedia.org/r/274662

Change 272962 merged by jenkins-bot:
Handle empty results from WebPageTest

https://gerrit.wikimedia.org/r/272962

Change 274662 merged by jenkins-bot:
Move non-working Amazon tests to wpt.org

https://gerrit.wikimedia.org/r/274662

I also added https://github.com/WPO-Foundation/webpagetest/issues/599 to ask for a changelog and a way to easier know what code runs on our server.

Some people report this as resolved. Should we try to move these tests back?

Change 305228 had a related patch set uploaded (by Phedenskog):
Run test on Brazil wiki from our instance.

https://gerrit.wikimedia.org/r/305228

Yes they work now (tested it locally) I'll move them. Ping @Jdlrobson the tests will change location so if you graph them you may need to change.

@Peter not sure I follow
The graphs are using Dulles as location (webpagetest.enwiki-mobile-2gslow.anonymous.pt-Brasil) - is that correct?
https://grafana.wikimedia.org/dashboard/db/mobile-2g?panelId=82&fullscreen

Yep we moved them to Dulles (WebPageTest.org) since they failed on our local instance, there was something strange going on in WebPageTest (https://github.com/WPO-Foundation/webpagetest/issues/569). I pinged you so you know that when we push the change, that will change in the graph. Because it's better to run on our own instance since we have more control of that.

Change 305228 merged by jenkins-bot:
Run test on Brazil wiki from our instance

https://gerrit.wikimedia.org/r/305228

It's out in the wild now.