Page MenuHomePhabricator

title_cache endpoint for image suggestions api doesn't work
Open, Needs TriagePublicBUG REPORT


In Cassandra I can see that there is a title_cache entry for Helen_Alford on enwiki

aqsloader@cqlsh:image_suggestions> select * from title_cache where wiki='enwiki' and title='Helen_Alford';

 wiki   | title        | page_id  | page_rev
 enwiki | Helen_Alford | 69520037 | 1084422451

(1 rows)

Calling the title_cache endpoint for the page, however, returns nothing

curl https://image-suggestion.discovery.wmnet:30443/private/image_suggestions/title_cache/enwiki/Helen_Alford
{"rows": []}

It's the same if I query by page_id

curl https://image-suggestion.discovery.wmnet:30443/private/image_suggestions/title_cache/enwiki/69520037
{"rows": []}

Note also that I think the documentation at is incorrect - my understanding was that the title_cache endpoint was to allow a client to retrieve a page id for a title, not the other way around (and that seems to be the way the cassandra table is set up according to T293808). I'd be bold and change the docs myself, but I want to be sure

Event Timeline

Change 808025 had a related patch set uploaded (by Eevans; author: Eevans):

[generated-data-platform/datasets/image-suggestions@main] Fix misnamed parameter

Change 808025 merged by jenkins-bot:

[generated-data-platform/datasets/image-suggestions@main] Fix misnamed parameter

A fix has been merged, but still needs to be deployed. I've never deployed this service, I can try to suss that out, or we can wait for @hnowlan to return. How urgent is this?

Thanks Eric. I would say it can wait until tomorrow when Hugh is back.

This endpoint exists for testing in non-prod environments when the article id's don't match up so if needed, as a workaround for basic testing, we could probably just use examples from the Hive staging tables to find articles we wanted to test with.

Change 808228 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/deployment-charts@master] image-suggestion: new container version