-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add the field sha256 to serializers and implement filters for this field #1615
Conversation
cffb47f
to
b42c41a
Compare
pulp_rpm/app/serializers.py
Outdated
@@ -546,7 +547,7 @@ class Meta: | |||
fields = SingleArtifactContentUploadSerializer.Meta.fields + ( | |||
'id', 'updated_date', 'description', 'issued_date', | |||
'fromstr', 'status', 'title', 'summary', 'version', | |||
'type', 'severity', 'solution', 'release', 'rights', | |||
'type', 'sha256', 'severity', 'solution', 'release', 'rights', |
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.
Advisories are artifactless, I don't think this filter/field is needed here. @daviddavis , @lubosmj, what do you think?
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.
Well, if a class inherits from the class SingleArtifactContentUploadSerializer which inherits from the class SingleArtifactContentSerializer, I assume it may contain an artifact. @goosemania , what do you think?
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.
That's logical :) Unfortunately, advisories are always a special case.
It inherits from SingleArtifactContentUploadSerializer
because a file is used to upload an advisory to Pulp.
Data from the file is parsed and saved into the DB, no artifact is saved in pulp storage or attached to that content unit.
To be more precise, during upload, the artifact is saved and then removed after being processed because it can't be a part of the advisory content unit.
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.
Alright then, what else is a special case? Only advisories?
b42c41a
to
bdb3e08
Compare
I removed the field |
bdb3e08
to
4951749
Compare
closes #6187
https://pulp.plan.io/issues/6187