Page MenuHomePhabricator

[Bug] Recommendation API returning error 500 in beta cluster blocks restbase CI
Closed, ResolvedPublic

Description

Steps to Reproduce

In the restbase project root dir:

  1. Run npm test locally
  2. Run npm run coverage -- sqlite fs locally
  3. Run ./node_modules/.bin/mocha test/features/recommendation.js to see the error isolated
  4. Access https://recommendation-api-beta.wmflabs.org/wikidata.beta.wmflabs.org/v1/description/addition/en to see the root cause

Expected Results

  • The above steps should return successful responses

Actual Results

  • Coverage script is breaking CI for restbase project

Environments Observed

Testing Environment for QA

Event Timeline

Change 604774 had a related patch set uploaded (by MSantos; owner: MSantos):
[mediawiki/services/recommendation-api@master] addition: check if wikidataPagesQuery exists

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

Change 604774 merged by jenkins-bot:
[mediawiki/services/recommendation-api@master] addition: check if wikidataPagesQuery exists

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

Now the CI is failing due to:

curl "https://recommendation-api-beta.wmflabs.org/wikidata.beta.wmflabs.org/v1/description/addition/en"

{"status":500,"type":"internal_error","title":"TypeError","detail":"Cannot read property 'pages' of undefined","method":"GET","uri":"/wikidata.beta.wmflabs.org/v1/description/addition/en"}

@Pchelolo I think this is what @MSantos' patch is fixing. It's merged but still needs to be deployed.

I've deployed @MSantos's patch to the Beta Cluster, and so the immediate issue this task concerns is resolved. It looks like RESTBase tests are still failing, now due to a different error on Beta Commons. The production recommendation-api deployment failed due to the endpoint check added in @MSantos's patch (T255683). I'm not sure why that fails yet.

RESTBase tests now pass locally \o/

Change 606481 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[mediawiki/services/recommendation-api@master] SE endpoints: Refactor for easier testing and add tests

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

Change 606481 merged by jenkins-bot:
[mediawiki/services/recommendation-api@master] SE endpoints: Refactor for easier testing and add tests

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