> Am 22.10.2019 um 15:20 schrieb Jesse Glick <[email protected]>:
> 
> On Tue, Oct 22, 2019 at 5:44 AM Ullrich Hafner <[email protected]> 
> wrote:
>>                        .withContext(new ConsoleLogSplitter(…)) // implements 
>> TaskListenerDecorator and writes the output to a temporary file
>>                        .withCallback(new RecordIssuesCallback(…)) // extends 
>> BodyExecutionCallback and reads the temporary file to extract the warnings
> 
> This sort of defeats the purpose of using `TaskListenerDecorator`, I
> think. You should be able to extract warnings on the fly without
> making a copy of the log.

Hmm, this is currently not possible since all parsers (XML, JSON parsers and 
console line parsers) use a different API at the moment: they basically work on 
a reader instance and not on single lines. I think it might be feasible to 
change that at least for those parsers that read the console log (and do not 
work on whole files) but this requires some extra work.    

> 
> Note that to behave properly with `sh`/`bat`/`powershell` steps in
> `org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep.USE_WATCHING=true`
> mode (including when `pipeline-cloudwatch-logs` is installed), as well
> as to handle some other steps like `checkout`, the
> `TaskListenerDecorator` must be prepared to run remotely inside the
> agent JVM. (See JEP-210 for background.) Under the assumption that
> warnings are occasional low-bandwidth events, this is most easily done
> by calling an exported interface method. The `timeout` step
> implementation has an example.
> 

If the TaskListenerDecorator method might be called on the agent how can I 
transfer results back to the master from it?
Or is the callback (from withCallback) then called on the agent as well?  

> -- 
> 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/CANfRfr2fMM1tFQsOhyROt3D5i%2BUHQpwZABqueP%3DCoNXJVRB8Bw%40mail.gmail.com.

-- 
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/CEDEA17E-D423-45FF-B91B-19BF4C9E3916%40gmail.com.

Reply via email to