hudson.Launcher.ProcStarter.stderr(OutputStream) question

27 views
Skip to first unread message

Martin Weber

unread,
Dec 17, 2018, 3:48:48 PM12/17/18
to Jenkins Developers
Hi,

in my plugin, do I have to always call
hudson.Launcher.ProcStarter.stderr(OutputStream)?

The docs say I do not have to; if unset, stderr output would go to stdin. But
I could not find any code in jenkins-core that is handling that case.

I am facing issue JENKINS-55215 [1] and have no clue why that happens.
The issue is reported on a pipeline script.

My code is in cmakebuilder at [2].

/Martin

[1] https://issues.jenkins-ci.org/browse/JENKINS-55215
[2] <https://github.com/jenkinsci/cmakebuilder-plugin/blob/
4ad7222c0ebc60afec04ad6772cd6ef6922e859e/src/main/java/hudson/plugins/cmake/
AbstractToolStep.java#L170>

--
E-Mails sollten Text sein, Text und nur Text.
Wenn Gott gewollt hätte, dass E-Mails in HTML geschrieben würden,
endeten Gebete traditionell mit </amen>.


Jesse Glick

unread,
Dec 18, 2018, 3:04:19 PM12/18/18
to Jenkins Dev
On Mon, Dec 17, 2018 at 3:48 PM Martin Weber <enten...@gmx.de> wrote:
> in my plugin, do I have to always call
> hudson.Launcher.ProcStarter.stderr(OutputStream)?

No, you should not. The call to `stdout(TaskListener)` ought to suffice.

> The docs say I do not have to; if unset, stderr output would go to stdin.

stdout I suppose you mean?

> But
> I could not find any code in jenkins-core that is handling that case.

https://github.com/jenkinsci/jenkins/blob/b826edb23de393bf1d79227247594b533ad7b363/core/src/main/java/hudson/Proc.java#L224

Martin Weber

unread,
Dec 19, 2018, 2:36:41 PM12/19/18
to jenkin...@googlegroups.com
Am Dienstag, 18. Dezember 2018, 21:04:02 CET schrieb Jesse Glick:
> On Mon, Dec 17, 2018 at 3:48 PM Martin Weber <enten...@gmx.de> wrote:
> > in my plugin, do I have to always call
> > hudson.Launcher.ProcStarter.stderr(OutputStream)?
>
> No, you should not. The call to `stdout(TaskListener)` ought to suffice.

OK.

>
> > The docs say I do not have to; if unset, stderr output would go to stdin.
>
> stdout I suppose you mean?

Of course, sorry.

>
> > But
> > I could not find any code in jenkins-core that is handling that case.
>
> https://github.com/jenkinsci/jenkins/blob/b826edb23de393bf1d79227247594b533a
> d7b363/core/src/main/java/hudson/Proc.java#L224

Thank you.
So I think it is unlikely for the missing build log lines [1] to be caused by
my plugin. Should I push the issue to pipeline component?

Martin


[1] https://issues.jenkins-ci.org/browse/JENKINS-55215

Jesse Glick

unread,
Dec 19, 2018, 4:42:31 PM12/19/18
to Jenkins Dev
On Wed, Dec 19, 2018 at 2:36 PM Martin Weber <enten...@gmx.de> wrote:
> So I think it is unlikely for the missing build log lines to be caused by
> my plugin.

Unclear. It would be best to narrow the issue down to a minimal,
self-contained, reproducible test case. That would either prove there
is a bug in some lower-level code (Jenkins core, Pipeline), or make it
obvious that there is a mistake in your plugin.

Martin Weber

unread,
Dec 19, 2018, 6:06:28 PM12/19/18
to jenkin...@googlegroups.com
OK, will try to. At least, the issue is somewhat unprecise in saying 'after
some updates'.
Reply all
Reply to author
Forward
0 new messages