-
Notifications
You must be signed in to change notification settings - Fork 556
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
Set component id if a numeric component is available in the component… #4008
base: master
Are you sure you want to change the base?
Conversation
@rmistry is there a way to get a componentid from component tag? |
# Set the componentId to the first encountered numeric component | ||
# in the component list. | ||
for component in list(self.components): | ||
if component.isnumeric(): |
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.
hmmm...will component ever be an int? this will fail in that case.
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.
It will not be an int, we are doing the same thing a few lines above:
clusterfuzz/src/clusterfuzz/_internal/issue_management/google_issue_tracker/issue_tracker.py
Line 665 in 22e1108
component_paths = self._get_component_paths(self.components) |
e7e91a0
to
22e1108
Compare
Interesting bugs for this area are b/315853316 and b/318504348 At the time those were submitted, predator returned full component paths, but infrastructure was added to make sure that whenever Chromium's I don't think you can get a |
# in the component list. | ||
for component in list(self.components): | ||
if component.isnumeric(): | ||
self._data['issueState']['componentId'] = int(component) |
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.
According to this it will set the first component that predator returns. It would be worth looking in logs for components in predator responses to see what is being returned. Maybe the first is not what we want, but it is likely impossible to say what we want.
Perhaps a better way to handle this is to say iff the size of self.components is 1 then set the componentId, otherwise leave it alone.
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.
Though as mentioned in b/341800538#comment8 the PEEPs bot is probably setting things to the 1st component anyway (would be good to verify what actually happens).
a714059
to
f4df493
Compare
… list