This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes
Fixes WordPress/openverse#689 by @sarayourfriend
Description
Adds request IDs to all logs so that we can trace them easily throughout a request without having to rebuild it ourselves (we can simply query for the request ID and then follow a request's logs in their entirety).
Also begins the process of adding logs to the search_controller around the pagination logic. I'm stumped by this branch though and am unsure how to describe it in the logs:
openverse-api/api/catalog/api/controllers/search_controller.py
Lines 69 to 80 in f823fb7
@dhruvkb @krysal @obulat do any of y'all have any ideas for this? Part of the problem is I'm unclear on how the link mask works and in particular this call is confusing the heck out of me:
openverse-api/api/catalog/api/controllers/search_controller.py
Line 70 in f823fb7
I have no idea what it's meant to do! calling
list(accumulate(integer_list))
basically builds out a factorial-ish kind of list as a result...I have absolutely zero clue about what this is meant to be doing for us here. If anyone can help explain this then I will also add some comments to this bit of code (and probably write a doc page about the query masking in general). It's quite cryptic without any context aside from the code!
Testing Instructions
TBD
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin