guardian / flexible-octopus-converter

An AWS Lambda for converting JSON from Octopus into Thrift.
1 stars 0 forks source link

Ignore for_publication values that are not important to us #8

Closed jennygrahamjones closed 4 years ago

jennygrahamjones commented 4 years ago

What does this change?

Creates an explicit set of publication destinations that we are interested in. In addition to the three values that we list in validPublicationDestinations, there are also possible destinations of n and y. When it comes to finding the primary body text in a bundle, we want to ignore articles with these values.

How can we measure success?

No more bundles added to the dead letter queue as a result of having unexpected for_publication values.

jennygrahamjones commented 4 years ago

I don't know of a way of exercising this code, but it looks good to me 👍 – if there is a way, lmk and I'm happy to test. ... just out of interest, do you know what 'y' and 'n' stand for?

'n' is neither and 'y' is... I'm not sure! Need to check with either @blishen or @hoyla on that one. We haven't modelled either values as part of our thrift model, though, which should contain all the possible values that are important to us.