-
Notifications
You must be signed in to change notification settings - Fork 124
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 the is_modular field from the Package model #3525
Conversation
pulp_rpm/app/models/repository.py
Outdated
.only("pk") | ||
).exclude( | ||
pk__in=pulp_rpm.app.models.modulemd.Modulemd_packages.values_list("package", flat=True), | ||
).only("pk") |
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.
This on the other hand might be tricky to do in a performant way. The through table is implicit so this doesn't actually work.
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.
is it worth filtering modulemd within the current repo version?
TODO: online migration implications? Do we need to drop the reliance separately from the PR that removes the field from the DB? |
aae984e
to
7c801c9
Compare
modular_packages.update(module.packages.all().values_list("pk", flat=True)) | ||
|
||
nonmodular_packages = set(packages.values_list("pk", flat=True)) - modular_packages | ||
nonmodular_packages = Package.objects.filter(pk__in=nonmodular_packages) |
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.
@pedro-psb @ipanova Do either of you see a way to make this more efficient without table changes?
Making the ModulemdPackage
table explicit rather than implicit would probably allow us to reduce the number of queries. I'm unsure if it's worth it though.
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.
I did some research to see if I could come up with something but no luck.
There is prefetch_related
, but I couldn't figure if this could fit in here.
Also, ideas of caching the context of the last repover crossed my mind, but I'm not aware of a suitable method for doing so.
f109047
to
0557824
Compare
The failures aren't related to the PR, it's all about the certificate. |
0557824
to
2657323
Compare
Removing the field from the model needs to be done in a later PR |
2657323
to
0089215
Compare
Back to draft. Unfortunately it seems like Katello uses this field :( |
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution! |
This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details. |
closes #3524