Skip to content

Conversation

@calixteman
Copy link
Collaborator

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

header = self.get_header()
user = BugzillaUser().get_whoami()
if not user:
raise BugzillaException('Not a valid user is associated to the given token')
Copy link
Collaborator

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):
Copy link
Collaborator

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.

last = get_last(bzmail, history)

if not last:
raise BugzillaException('Impossible to get update the bug {}'.format(first_id))
Copy link
Collaborator

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 ...

last_time = dateutil.parser.parse(last['when'])

success = False
for _ in range(max_retry):
Copy link
Collaborator

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.

Copy link
Collaborator

@marco-c marco-c left a 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?

@jankeromnes
Copy link
Contributor

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.

@La0 La0 removed the request for review from jankeromnes March 1, 2019 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants