Switch from checking with 'startsWith' to checking a full equals of 'search' for the path. The previous 'startsWith' method was mis-classifying queries such as 'searchlight-pictures-the-banshees-of-inisherin', causing bugs for some backfilled containers.
The broken item queries are
searchlight-pictures-the-banshees-of-inisherin
Because the item path becomes search in the first instance, and stays as searchlight-pictures-the-banshees-of-inisherin in the second, using .startsWith was capture both instances. This PR fixes that
How to test
We've added a test to cover this case for the future
Have we considered potential risks?
We checked the full fronts tool config file, all the cases of using the search?... parameter would still work, and the remaining are the 'searchlight' type backfills which are currently broken
Deployment
[ ] Updated facia-tool to use latest version
[x] Updated frontend to use latest version
[x] Updated MAPI to use latest version
[ ] Updated Ophan to use latest version
[ ] Updated story-packages to use latest version
[ ] Updated apple-news to use latest version
[ ] Checked for other downstream dependencies (perhaps via snyk or github search)
Co-Authored-By: Ioanna Kokkini ioannakok@users.noreply.github.com
What does this change?
Switch from checking with 'startsWith' to checking a full equals of 'search' for the path. The previous 'startsWith' method was mis-classifying queries such as 'searchlight-pictures-the-banshees-of-inisherin', causing bugs for some backfilled containers.
Search queries look like:
search?tag=...&stuff=...
The broken item queries are
searchlight-pictures-the-banshees-of-inisherin
Because the item path becomes
search
in the first instance, and stays assearchlight-pictures-the-banshees-of-inisherin
in the second, using .startsWith was capture both instances. This PR fixes thatHow to test
We've added a test to cover this case for the future
Have we considered potential risks?
We checked the full fronts tool config file, all the cases of using the
search?...
parameter would still work, and the remaining are the 'searchlight' type backfills which are currently brokenDeployment