Page MenuHomePhabricator

MediaWiki API Testing failures for /search
Open, HighPublic

Description

On https://gerrit.wikimedia.org/r/c/integration/quibble/+/850175/ there are a six API tests failling for mediawiki/core /search. https://integration.wikimedia.org/ci/job/integration-quibble-fullrun-sqlite/152/consoleFull

Maybe it is related to SQLite?

6 failing

1) Search
     GET /search/page?q={term}
       should return array of pages when there is only a text match:

    AssertionError: expected [] to have a length of 1 but got +0
    + expected - actual

    -0
    +1
    
    at Context.<anonymous> (tests/api-testing/REST/Search.js:34:11)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
2) Search
     GET /search/page?q={term}
       should return array of pages when there is only title match:

    AssertionError: expected [] to have a length of 1 but got +0
    + expected - actual

    -0
    +1
    
    at Context.<anonymous> (tests/api-testing/REST/Search.js:54:11)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
3) Search
     GET /search/page?q={term}
       should return a single page when there is a title and text match on the same page:

    AssertionError: expected [] to have a length of 1 but got +0
    + expected - actual

    -0
    +1
    
    at Context.<anonymous> (tests/api-testing/REST/Search.js:66:11)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
4) Search
     GET /search/page?q={term}
       should return two pages when both pages match:

    AssertionError: expected [] to have a length of 2 but got +0
    + expected - actual

    -0
    +2
    
    at Context.<anonymous> (tests/api-testing/REST/Search.js:78:11)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
5) Search
     GET /search/page?q={term}
       should return only one page when two pages match but limit is 1:

    AssertionError: expected [] to have a length of 1 but got +0
    + expected - actual

    -0
    +1
    
    at Context.<anonymous> (tests/api-testing/REST/Search.js:85:11)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
6) Search
     GET /search/page?q={term}
       should ignore duplicate redirect source and target if both pages are a match:

    AssertionError: expected [] to have a length of 1 but got +0
    + expected - actual

    -0
    +1
    
    at Context.<anonymous> (tests/api-testing/REST/Search.js:113:11)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I think I remember seeing this or something like this before, and it was a SQLite issue.

I think I remember seeing this or something like this before, and it was a SQLite issue.

Oh yes, it was in T302706, and I believe the relevant task is T302739: Ensure Search endpoint results are consistent regardless of database result ordering

Gehel subscribed.

This isn't related to CirrusSearch, but to the specifics of how it is exposed through API. I'm removing the Search Platform team and adding the API Platform instead.

Change 866551 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/core@master] api-testing: Skip flaky Search.js tests

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

Change 866551 abandoned by Kosta Harlan:

[mediawiki/core@master] api-testing: Skip flaky Search.js tests

Reason:

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

Change 868034 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[integration/config@master] Skip API testing tests for Quibble ci-fullrun with sqlite

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

Change 868034 merged by jenkins-bot:

[integration/config@master] Skip API testing tests for Quibble ci-fullrun with sqlite

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

@hashar noted in T324813#8495223 that we can query the siteinfo module to get the database type, then conditionally skip the tests when SQLite is in use.