Hi,
I’m currently struggling with an exception in core that is caused by the
following code [1] in my plugin. I am setting the result of a pipeline step if
the quality gate fails:
flowNode.addOrReplaceAction(new WarningAction(result).withMessage(message));
This call sometimes fails in core with:
java.lang.UnsupportedOperationException
at
java.util.concurrent.CopyOnWriteArrayList$COWIterator.remove(CopyOnWriteArrayList.java:1182)
at java.util.AbstractCollection.removeAll(AbstractCollection.java:376)
at hudson.model.Actionable.addOrReplaceAction(Actionable.java:209)
at
io.jenkins.plugins.analysis.core.util.PipelineResultHandler.setResult(PipelineResultHandler.java:34)
Is this a bug in core or am I using the API in a not supported way? (This
exception rarely occurs, however, at least 2 different people reported that
problem recently[2]). The affected code is in core for quite some years now so
I wonder why nobody has been hit by that problem before.
[1]
https://github.com/jenkinsci/warnings-ng-plugin/blob/master/plugin/src/main/java/io/jenkins/plugins/analysis/core/util/PipelineResultHandler.java#L30
<https://github.com/jenkinsci/warnings-ng-plugin/blob/master/plugin/src/main/java/io/jenkins/plugins/analysis/core/util/PipelineResultHandler.java#L30>
[2] https://issues.jenkins.io/browse/JENKINS-64438
<https://issues.jenkins.io/browse/JENKINS-64438>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/DD7EB1C3-B0BE-4BC8-89AA-4A54DDB20980%40gmail.com.