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

multiple active webhooks from one repository generate many build completion messages #4

Open
mtmorgan opened this issue Jan 11, 2019 · 0 comments

Comments

@mtmorgan
Copy link
Contributor

mtmorgan commented Jan 11, 2019

e.g., two 'Received a valid push' messages received at Bioconductor/Contributions#968 (comment)

track_build_completion.log contains

ERROR: 01/10/2019 08:43:52 PM track_build_completion.py - failed to handle event: list.remove(x): x not in list.

which is from

logging.error("failed to handle event: %s." % e)
Because the function returns immediately, the message is never marked as 'received' a few lines down. Presumably the message remains on the queue, and is processed again.

I am guessing that 'list.remove()' refers to

build_counter.setdefault(job_id, []).remove(builder_id)
This occurs when a list is empty

>>> x = []
>>> x.remove('a')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: list.remove(x): x not in list

presumably because the two webhooks have put the global variable tracking builders build_counter into an inconsistent state.

It seems like the message should be marked as received, even if it is not handled correctly (move lie 371 before 363 ?) and that somewhere in https://github.com/Bioconductor/issue_tracker_github/blob/master/core.rb#L486-L507 duplicate webhooks should not be allowed to run (e.g., by adding a field to the data base that indicates a build is already in progress?)

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

No branches or pull requests

1 participant