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

add missing synchronization context needed for rule's matchedTimes #38

Merged
merged 3 commits into from
Jan 30, 2021

Conversation

theKBro
Copy link
Contributor

@theKBro theKBro commented Jan 29, 2021

No description provided.

@codecov
Copy link

codecov bot commented Jan 29, 2021

Codecov Report

Merging #38 (ef4758d) into master (cf49ae0) will increase coverage by 0.01%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
+ Coverage   98.46%   98.48%   +0.01%     
==========================================
  Files          23       23              
  Lines         196      198       +2     
  Branches       18       18              
==========================================
+ Hits          193      195       +2     
  Misses          1        1              
  Partials        2        2              
Impacted Files Coverage Δ
...nkins/buildhistorymanager/BuildHistoryManager.java 95.65% <94.11%> (+0.41%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf49ae0...527c95a. Read the comment docs.

@@ -40,33 +40,34 @@ public BuildHistoryManager(List<Rule> rules) {
*/
@Override
public void perform(Job<?, ?> job) throws IOException, InterruptedException {
synchronized (this) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first, this can go to method signature as you synchronize whole method

second - the problem happens when plugin is executed twice at the same time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second - yes this happend quite frequently on our server.
e.g. if the hourly check and the check on start of the build is executed at the same time

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first applied

@damianszczepanik damianszczepanik merged commit 27f2a5c into jenkinsci:master Jan 30, 2021
@damianszczepanik
Copy link
Member

Good job, thanks!

theKBro added a commit to theKBro/build-history-manager-plugin that referenced this pull request Jan 30, 2021
@theKBro theKBro deleted the fix_synchronizeExecution branch January 30, 2021 19:38
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.

2 participants