-
Notifications
You must be signed in to change notification settings - Fork 14
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 issue with Bugzilla.put: some bugs were updated multiple times #135
base: master
Are you sure you want to change the base?
Conversation
libmozdata/bugzilla.py
Outdated
header = self.get_header() | ||
user = BugzillaUser().get_whoami() | ||
if not user: | ||
raise BugzillaException('Not a valid user is associated to the given token') |
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.
There is no valid user associated to ...
return failures | ||
|
||
success = False | ||
for _ in range(max_retry): |
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.
We should probably wait a bit before trying again.
libmozdata/bugzilla.py
Outdated
last = get_last(bzmail, history) | ||
|
||
if not last: | ||
raise BugzillaException('Impossible to get update the bug {}'.format(first_id)) |
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.
Impossible to get last update to the ...
libmozdata/bugzilla.py
Outdated
last_time = dateutil.parser.parse(last['when']) | ||
|
||
success = False | ||
for _ in range(max_retry): |
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.
Same here, we might want to wait a bit between retries.
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 overall, but it is really complex. Could we just update one bug at a time instead? Or do you need it to be fast?
Hi @calixteman 🙂 are you still waiting for my review? If so, I can try taking a look soon, otherwise please feel free to rebase / merge this without my review. |
An update on a chunk can return an error when only one bug fail to update and so in that case we triggered an update for all the chunk which leaded to dup updates in some bugs.
So the goal is to fix that:
i) use requests instead of requests_futures: no need to nag bmo
ii) in case of failures: check the history of the bugs in the chunk to find the failing ones