-
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
Fix sync and upload of the same erratum #852
Conversation
afbc7ec
to
300a29e
Compare
@@ -453,6 +455,11 @@ class Errata(UnitMixin, ContentUnit): | |||
|
|||
SERIALIZER = serializers.Errata | |||
|
|||
# Erratum fields that can be updated | |||
erratum_fields_update = ('status', 'updated', 'description', 'pushcount', 'references', |
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.
Consider renaming this to mutable_erratum_fields
which would allow the comment above to be removed. I think the idea that a field is mutable means it can be updated.
@goosemania I'm done w/ my review with probably too many comments. It's really good and it's handling a complicated case. I'm still unclear on one section due to the |
:return: True if the other erratum is newer than the existing one | ||
:rtype: bool | ||
""" | ||
err_msg = _('Fail to update the %(which)s erratum %(id)s: ' |
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.
nice internationalization 🐈 🎏 🐠
existing_unit.merge_errata(new_unit) | ||
unit = existing_unit | ||
|
||
# No need to catch NotUniqueError here. We save either the new erratum or the merged one. |
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 comment can probably be removed.
@goosemania This is really good. I left a few small comments, but otherwise I think it looks good to merge. I'm adding the LGTM flag. There is just 1 area that probably needs a little bit of testing work. The redmine story talks about pulp-smash tests which will make use of this. Instead of doing them along with this story as the issue suggests I recommend the following:
|
Handle pkglist for the same errata in different repositories. Update errata metadata based on `updated` field. closes pulp#858 https://pulp.plan.io/issues/858
Handle pkglist for the same errata in different repositories.
Update errata metadata based on
updated
field.closes #858
https://pulp.plan.io/issues/858