Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

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