-
Notifications
You must be signed in to change notification settings - Fork 213
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
Remove transition code in search controller #706
Comments
Can we check the production cache to confirm this is safe? |
@sarayourfriend given how long this has existed in the code, it's safe to assume this code has executed at least once, but yeah we can check the cache once and verify. |
* Always use Jamendo's "streaming" audio * Simplify functions, fix documentation
@dhruvkb can you update this issue with a new link for the monorepo code? At a glance, I think I understand what would need to be removed, but the issue is old enough and the link is to the archive repo, so my confidence that I can understand it is low (which doesn't bode well for many other people outside the team 😅). |
@sarayourfriend, done. |
Hey @dhruvkb, I'd like to work on this issue. Can you please assign it to me? |
Sure, please go ahead! |
Thanks, @dhruvkb. I'm on it! |
…ordPress#5050) * Remove obsolete cache invalidation code from get_sources function(fixes WordPress#706) * Revert unrelated changes Signed-off-by: Olga Bulat <[email protected]> --------- Signed-off-by: Olga Bulat <[email protected]> Co-authored-by: Olga Bulat <[email protected]>
Problem
The code described in this snippet was transitionary and has served its utility. It should be removed.
openverse/api/api/controllers/search_controller.py
Lines 552 to 569 in 7e558ef
Description
This cache invalidation snippet has definitely run in production and the caches have surely been migrated to the new format. This should no longer be a part of the codebase.
Alternatives
Even in the highly unlikely event that the caches have not been cleared and updated, a better solution would be to use
try...except
to handle invalid values rather than using a very specific transition state.Additional context
The issue originally pointed to this code snippet from the now-deprecated and archived
WordPress/openverse-api
repohttps://github.com/WordPress/openverse-api/blob/6cc0551c639081f895d974b30cc465713d0ce360/api/catalog/api/controllers/search_controller.py#L379-L387
Implementation
The text was updated successfully, but these errors were encountered: