Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enriching Audio / Podcast content does not work with 2020 ES results. #234

Open
AniaMakes opened this issue Sep 4, 2020 · 0 comments
Open

Comments

@AniaMakes
Copy link
Contributor

As part of ACC-622 I was updating fixtures. They were created in 2017, and the ES results have been enriched multiple times since.

When I try to update the 98b46b5f-17d3-40c2-8eaa-082df70c5f01 fixture ("The Economics of Migration" podcast"), the tests start failing.

in test/fixtures/content, if I update...

JUST items.json:

  1. server/controllers/resolve.spec.js return an Array of distinct content items for every content ID it can find: [ it doesn’t match, but content the same??]
  2. server/lib/get-content.spec.js test return an Array of content items for every content ID it can find: [got 5, expected 6]

BOTH items.json and the ES fixture file

/Users/anna.bebb/code/next-syndication-api/test/server/lib/download/index.spec.js:43
		const className = `${content.type.charAt(0).toUpperCase()}${content.type.substring(1)}Download`;
		                             ^
TypeError: Cannot read property 'type' of null

JUST ES fixture file

/Users/anna.bebb/code/next-syndication-api/test/server/lib/download/index.spec.js:43
		const className = `${content.type.charAt(0).toUpperCase()}${content.type.substring(1)}Download`;
		                             ^

TypeError: Cannot read property 'type' of null

Having rubber-ducked this with @thurstontye , we discovered that the 2017 Elastic Search result for podcast was "type": "podcast", (line 19), and the 2020 version is "type": "audio", "subtype": "podcast",. As far as we can figure out, the enriching logic is built around the type being podcast, so with the changed structure this fails.

It is highly likely this is currently happening on prod. However, we think this actually isn't an immediate problem because podcasts are free content (you can listen to them on any podcast app, you don't need to pay the FT subscription) and therefore not subject to syndication in the first place? Either way, this investigation is out of scope for ACC-622 and I can proceed without updating this particular fixture, but it feels like this needs fixing in the longer term, or deleting altogether if this sort of content doesn't fall under syndication rules?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant