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

Change BuildStepMonitor to allow for higher concurrency #19

Merged
merged 3 commits into from
Mar 21, 2019

Conversation

013k-m
Copy link
Contributor

@013k-m 013k-m commented Mar 14, 2019

Jenkins changed getPreviousBuild() to halt jobs if a previous
build hasn't finished, meaning jobs of variable runtime end up
being serialized:

https://issues.jenkins-ci.org/browse/JENKINS-9913?focusedCommentId=184188&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-184188

This change switches to the latest completed build, allowing
this plugin to work with jobs of variable length.

This change is made in a same way as for slack-plugin
jenkinsci/slack-plugin@832e7b5

@codecov
Copy link

codecov bot commented Mar 14, 2019

Codecov Report

Merging #19 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #19      +/-   ##
============================================
+ Coverage     80.97%   80.97%   +<.01%     
- Complexity     1414     1415       +1     
============================================
  Files           224      224              
  Lines          4735     4736       +1     
  Branches        379      379              
============================================
+ Hits           3834     3835       +1     
  Misses          767      767              
  Partials        134      134
Impacted Files Coverage Δ Complexity Δ
...ns/plugins/analysis/core/steps/IssuesRecorder.java 88.23% <100%> (+0.05%) 94 <1> (+1) ⬆️
...s/plugins/analysis/core/util/IssuesStatistics.java 100% <0%> (ø) 16% <0%> (ø) ⬇️
...ns/analysis/core/util/IssuesStatisticsBuilder.java 100% <0%> (ø) 18% <0%> (ø) ⬇️
...ugins/analysis/core/columns/IssuesTotalColumn.java 74.66% <0%> (ø) 12% <0%> (ø) ⬇️
.../plugins/analysis/core/charts/LinesChartModel.java 72.72% <0%> (ø) 8% <0%> (ø) ⬇️
...nkins/plugins/analysis/core/model/DeltaReport.java 100% <0%> (ø) 11% <0%> (ø) ⬇️

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 01301c9...3fedf21. Read the comment docs.

@uhafner
Copy link
Member

uhafner commented Mar 17, 2019

Does this help anything in your real setup? I think we also need to override

IssueRecorder.getRequiredMonitorService

and return BuildStepMonitor#NONE

@013k-m
Copy link
Contributor Author

013k-m commented Mar 19, 2019

@uhafner yes this issue really blocks usage of this plugin in our setup (with concurrent executors) as each next build waits for a checkpoint (before parsing checkstyle results) for the end of the previous build and execution time of our builds starts to grow like a snowball. For such jobs we have to use old deprecated plugin to parse checkstyle results and it would be really nice to change this.

@uhafner
Copy link
Member

uhafner commented Mar 20, 2019

@013k-m I understand that it blocks your system. I just wondered if it is already noticeable better using other getters without the BuildStepMonitor change in your system? Did you deploy the change to your machine?

@013k-m
Copy link
Contributor Author

013k-m commented Mar 20, 2019

@uhafner I was checking it in a dockerized jenkins with a pipeline flow and I was not able to reproduce this, but I just rechecked again and it is reproducible only in a normal jenkins job and you are right, we just need to override the buildstepmonitor to fix that behavior. Sorry for that, should I tuneup or recreate this pr?

@uhafner
Copy link
Member

uhafner commented Mar 21, 2019

Just revert the first commit and push again. Then we have the history and discussion visible in this PR. If we need to change the getters later on as well we know the background discussion in this PR.

@013k-m 013k-m changed the title Change .getPreviousBuild() to allow for higher concurrency Change BuildStepMonitor to allow for higher concurrency Mar 21, 2019
@uhafner uhafner merged commit 032c31b into jenkinsci:master Mar 21, 2019
@013k-m 013k-m deleted the allow_higher_concurrency branch March 21, 2019 21:22
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