-
Notifications
You must be signed in to change notification settings - Fork 214
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
Defer the tags_list
for media models
#1029
Conversation
Full-stack documentation: Ready https://WordPress.github.io/openverse/_preview/1029 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just one suggestion regarding the name of the custom manager class, but that's non-blocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but big +1 to Madison's suggestion for a clearer name for the manager.
I think you can drop the "custom" from the name as well: that fact is implied by its definition. (That's really just a nit though!)
Co-authored-by: Madison Swain-Bowden <[email protected]>
Bumps [pytest-socket](https://github.com/miketheman/pytest-socket) from 0.5.1 to 0.6.0. - [Release notes](https://github.com/miketheman/pytest-socket/releases) - [Changelog](https://github.com/miketheman/pytest-socket/blob/main/CHANGELOG.md) - [Commits](miketheman/pytest-socket@0.5.1...0.6.0) --- updated-dependencies: - dependency-name: pytest-socket dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Fixes
Related to #704 by @obulat
Description
This is the first step of the three-step process we need to follow to remove the
tags_list
from the database for zero-downtime deployments. This PR adds a custom Manager to the AbstractMedia model that prevents querysets from trying to accesstags_list
field as part of the model.After this PR is deployed, we will need to drop the
tags_list
column from the database.After the column is dropped, we can deploy the PR #956 that removes the
tags_list
field from the models and adds corresponding migrations. Note: theCustomManager
needs to be removed from #956, otherwise we get an error when it is trying to defer thetags_list
field that doesn't exist.Testing Instructions
Run
just up
and search for something (http://localhost:50280/v1/images/?q=cat). In the logs (runjust logs web
or use the Docker UI to view theopenverse-web-1
logs), you should see a log line with SELECT query that does not havetags_list
:If you do the same on main, you should see that the query does contain
tags_list
(see logs in this comment)Checklist
Update index.md
).main
) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin