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

Filter out duplicate builds correctly #48

Merged
merged 3 commits into from
Sep 14, 2022
Merged

Filter out duplicate builds correctly #48

merged 3 commits into from
Sep 14, 2022

Conversation

lprimak
Copy link
Contributor

@lprimak lprimak commented Sep 9, 2022

Prevents submission of duplicate jobs by comparing them to the ones already submitted.
Fixes the underlying issues while not preventing multiple jobs per action from running

  • please use "ignore whitespace" when reviewing *

fixes #27
fixes #32
fixes #49

  • [X ] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • [ X] Ensure that the pull request title represents the desired changelog entry
  • [X ] Please describe what you did
  • [X ] Link to relevant issues in GitHub or Jira
  • [X ] Link to relevant pull requests, esp. upstream and downstream changes
  • [X ] Ensure you have provided tests - that demonstrates feature works or fixes the issue

@lprimak lprimak marked this pull request as ready for review September 9, 2022 03:13
@lprimak lprimak changed the title Dedup builds Filter out duplicate builds Sep 9, 2022
@lprimak lprimak changed the title Filter out duplicate builds Filter out duplicate builds correctly Sep 9, 2022
@lprimak
Copy link
Contributor Author

lprimak commented Sep 14, 2022

@bluesliverx What do you think?

@bluesliverx
Copy link
Contributor

Sorry @lprimak, finally looked at this. This solution looks great! My only concern that the job instances may not be exactly equal depending on how they are constructed/stored. The worst that can happen here is that we get duplicate triggers for the same job, however, and you should be able to tell if that is happening or not pretty quickly I think.

I'll get this merged and released, thanks for contributing again!

@bluesliverx bluesliverx merged commit 986d787 into jenkinsci:master Sep 14, 2022
@lprimak lprimak deleted the dedup-builds branch September 14, 2022 20:07
@lprimak
Copy link
Contributor Author

lprimak commented Sep 15, 2022

Thank you! I have been running with this version for a while and haven't seen any duplicate commits.
They used to happen to me all the time, so it should work for most cases :)

@bluesliverx
Copy link
Contributor

This has now been released. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants