-
Notifications
You must be signed in to change notification settings - Fork 25
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
fixes intermittent multiple job invocations #41
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Sadly this has broken the following workflow, in which we expect multiple builds to be triggered:
triggerPRCommentBranchProperty
e.g. one withcommentBody(".*foo this please.*")
and another withcommentBody(".*bar this please.*")
for (Job...
loop gets to first)The workaround is of course to do a separate comment for each one, but when you want to trigger 5 different custom test runs, this is a 5x increase in (a) effort to initiate, and (b) the amount of email spam sent to others watching the PR.
Perhaps if instead of doing
break
it instead checked whetherjob
had already been scheduled, that would be a way of avoiding duplicates without stopping multiple different jobs being scheduled from the same comment?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 have been seeing issues for weeks with similar problems, and your comment just made me connect it to this PR. I'm downgrading the plugin on our Jenkins to verify that this is indeed the cause.
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.
@sparrowt please open a new issue.
As I mentioned in the comment #41 (comment),
this would break the cases where multiple legitimate jobs would be triggered by a single comment.
Unfortunately I don't have the environment to test this on.
This PR fixes the 99% case where this plugin was broken for a long time, as reported in multiple issues by multiple people.
I can propose a short-term fix by adding a checkbox that turns off one-per-comment build (default would be on) since that's 99% of the cases.
In the future if there is more interest to see what actually causes duplicate builds maybe there would be more time to take this on
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.
Sorry I never got round to this - however it looks like #49 was opened and #48 fixes it (released in https://github.com/jenkinsci/github-pr-comment-build-plugin/releases/tag/82.v986d7874d9c5) so thank you!