On Mon, Oct 26, 2015 at 10:10 PM, Gavin <[email protected]> wrote:
> I'm working on a legacy module that has BuildStepMonitor.BUILD.
>
> I was reading
> http://javadoc.jenkins-ci.org/hudson/tasks/BuildStep.html#getRequiredMonitorService()
> and it says if I'm not using getPreviousBuild, then I can safely change it.

As a rule, yes. Even if it is using `getPreviousBuild`, you can
probably change it to `NONE`, you just need to look a little more
closely.

> I'm not 100% sure the code (
> https://github.com/jenkinsci/sauce-ondemand-plugin/blob/master/src/main/java/hudson/plugins/sauce_ondemand/SauceOnDemandTestPublisher.java#L70)
> is actually not doing something simular.

It is not. Maven projects are weird. This is just saying: for a given
build of the moduleset (in general, a reactor project), look up the
last build of each module, and collect its test reports. Now the last
build of each module might have been built from this reactor build, or
it might be older (if some reactor builds skipped modules), or it
might be newer (if some individual module builds were rerun). I think
`getModuleBuilds` only supplies the same-or-older module builds.

At any rate, this publisher does not seem to need to wait for a
previous reactor build to complete in order to be correct, so use
`NONE`.

> Is there a set of jobs or tests or something I can download to confirm this
> behavior won't be broken if i change it?

Unless the plugin happened to have extensive functional tests, no.

-- 
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/CANfRfr0Wt-iqq7m-md0F3wtwM5ETo8QW1ecOXWQ%2BhR45Ui5C7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to