Page MenuHomePhabricator

Swagger probe test for page fetch API is failing
Closed, ResolvedPublic4 Estimated Story PointsBUG REPORT

Description

CXServer production logs has many entries as shown below:

image.png (523×1 px, 135 KB)

This is originated form the x-amples entries in swagger spec. https://github.com/wikimedia/mediawiki-services-cxserver/blob/master/spec.yaml#L99

However, the space in the title is causing the issue. In the same spec.yaml, the same title is present without '_' too. That generated rest.php URLs like this:
https://en.wikipedia.org/w/rest.php/v1/page/User%3ABSitzmann%2B(WMF)%2FMCS%2FTest%2FFrankenstein/html?

Which returns error: "The specified page (User:BSitzmann+(WMF)/MCS/Test/Frankenstein) does not exist"

Either we need to update spec.yaml to use underscore consistantly or make sure titles are normalized as required(this is preferred solution)

Event Timeline

santhosh renamed this task from Swagger proble test for page fetch API is failing to Swagger probe test for page fetch API is failing.Dec 11 2024, 7:23 AM
Wangombe changed the task status from Open to In Progress.Dec 16 2024, 11:40 AM
Wangombe claimed this task.

@santhosh I cannot reproduce this issue locally using the /v1/page/{language}/{title} endpoint. I don't think the User namespace has anything to do with the errors, does it? @ngkountas submitted a patch to fix this normalization issue in T357769. The regex responsible for normalization of the text covers all possible 'white space' variations.

T382294 --> The review of this patch should resolve this issue.

Change #1118378 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/services/cxserver@master] Remove space character in example titles

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

Change #1118378 merged by jenkins-bot:

[mediawiki/services/cxserver@master] Remove space character in example titles

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

Which returns error: "The specified page (User:BSitzmann+(WMF)/MCS/Test/Frankenstein) does not exist"

We're not sure what's triggering this request with the invalid page name. Either way I don't think we should bother logging 404 errors.

Change #1118800 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/services/cxserver@master] MWPageLoader: Avoid logging 404 errors

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

Change #1118800 merged by jenkins-bot:

[mediawiki/services/cxserver@master] MWPageLoader: Avoid logging 404 errors

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

Change #1119052 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2025-02-12-075258-production

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

Change #1119052 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2025-02-12-075258-production

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

Mentioned in SAL (#wikimedia-operations) [2025-02-13T04:45:46Z] <kart_> Updated cxserver to 2025-02-12-075258-production (T381943)

Change #1118800 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/services/cxserver@master] MWPageLoader: Avoid logging 404 errors

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

The above patch has been deployed to production and we are no longer seeing 404 errors being logged to Logstash.

Change #1119454 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/services/cxserver@master] Error middleware: Log enitre HTTP error object

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

Change #1119454 merged by jenkins-bot:

[mediawiki/services/cxserver@master] Error middleware: Log entire HTTP error object

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

Change #1119478 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2025-02-13-102531-production

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

Change #1119478 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2025-02-13-102531-production

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