Page MenuHomePhabricator

title_cache endpoint for image suggestions api doesn't work
Closed, ResolvedPublicBUG REPORT

Description

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 https://www.mediawiki.org/wiki/Platform_Engineering_Team/Data_Value_Stream/Data_Gateway#Title_(cache) 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

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

Change 808025 merged by jenkins-bot:

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

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

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

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

I thought @hnowlan 's patch meant that this was deployed but it's still not working so I guess not?

Change 808228 merged by jenkins-bot:

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

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

I thought @hnowlan 's patch meant that this was deployed but it's still not working so I guess not?

This was blocked on review, I've just deployed it so let me know if it works now.

Looks good to me...thanks!

lbowmaker@stat1006:~$ curl https://image-suggestion.discovery.wmnet:30443/private/image_suggestions/title_cache/enwiki/Helen_Alford

{
	"rows": [{
		"wiki": "enwiki",
		"title": "Helen_Alford",
		"page_id": 69520037,
		"page_rev": 1084422451
	}]
}
Cparle claimed this task.