-
Notifications
You must be signed in to change notification settings - Fork 8
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
Change Bugzilla collector and Flaw model to allow multi-components in bz_summary #426
Conversation
To reviewer: Sorry for the single commit PR with multiple changes, the migration should be the 1st and it makes the API fail the tests making it unable to be in a different commit. |
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 change is not backwards compatible and contains non-safe migrations, the easiest solution at this point in time would probably be:
- Keep
component
field as-is - Deprecate
component
field in the API - Create new field
components
, prefill with existingcomponent
field - Expose
components
field in API
802365d
to
ccaef2b
Compare
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.
The new functionality looks OK to me but I agree with @Elkasitu that we should for now keep the old component field for the backward compatibility. It should be deprecated and maybe just return the first item from components list.
82740c0
to
bf2d354
Compare
Makes sense, I've deprecated the |
ba3ca98
to
8cb305e
Compare
@costaconrado I am not sure I understand the question 👼 I mean that the value of the old attribute component should simply be the first item in the new components list attribute. It was just mean for the backwards compatibility so there is some meaningful value until we deprecate it full. It is probably not very important which item from components would be returned as the component - first/last/random/whatever. Just some meaningful value. It will be temporary anyway. |
8cb305e
to
058bf64
Compare
ef65ae6
to
1ad4d47
Compare
c2c1497
to
e1b168e
Compare
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 propose slight changes in how the old component
is treated - it is rather a single component even though there are multiple of them in the original Bugzilla summary and I think it should be still consider so before we remove it.
osidb/filters.py
Outdated
@@ -268,6 +271,16 @@ def is_major_incident_filter(self, queryset, name, value): | |||
] | |||
) | |||
|
|||
def component_filter(self, queryset, name, value): | |||
""" | |||
Based on the `value`, returns all Flaws which contains all components listed separed by colon. |
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.
nitpick: separed
to separated
a605f8c
to
4290c58
Compare
81ef217
to
98bbcc7
Compare
98bbcc7
to
9e49828
Compare
I have changed the behavior so Please take a second look in this PR when you have some time @osoukup. Thanks! |
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
410a421
to
5cb4a3a
Compare
5cb4a3a
to
8c930ab
Compare
… bz_summary Signed-off-by: Conrado Costa <concosta@redhat.com>
8c930ab
to
062fb4f
Compare
This PR changes the way Bugzilla collector parse summary.
This PR changes flaw model so component can support multiple components.
This PR also changes the parser of bugzilla collector to bz_summary be parsed as a list instead of a single component.
This PR introduces a major change in API (component became components) and the filter for flaws changed in order to support it.
This PR also adds a property called
component_str
for checks that uses component as a condition.Closes OSIDB-1420.