-
Notifications
You must be signed in to change notification settings - Fork 56
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
Should pipeline erros be displayed in pipeline's console? #357
Comments
Can you provide an example pipeline? If you have at least one stage I think it does something. |
Well, my example is quite complex beucase I use a library that is capable to handle everything on my pipeline. However, it fails before execute the main library method, and that's what makes me believe that the pipeline console can't show any message that isn't within a proper stage or step. It looks like this: #!/usr/bin/env groovy
env.PIPELINE_VERSION = params.PIPELINE_VERSION ?: '1.0.0'
library "my-library@${PIPELINE_VERSION}"
// The error is triggered right here
withCredentials([string(credentialsId: 'my-fake-crendential', variable: 'token')]) {
pipeline_args = [
foo: [
bar: [
['Foo', '.']
],
test: [
unit: [
foo: "./run_tests.sh",
bar: true,
],
],
]
]
pipelines.my_pipeline(pipeline_args)
} This is the console output that I get only on Classical Console:
|
thanks best way to add a reproducer is to just create a simple pipeline that does the same thing. Likely this is enough:
|
@timja, do you have time to work on this fix? |
Most likely at some point unless someone else gets to it first, but no timescales right now. |
The same behavior occurs on version 227 @timbrown5: |
I can reproduce it with just #357 (comment) |
The code goes into here: Line 360 in 25eb2ab
Finds the The Line 379 in 25eb2ab
node is an instanceof I think maybe we just need some generic handling for when there's no stages and this would work. |
This #363 fixes this specific case, I'd like to explore some more cases as well. It unfortunately does it with a synthetic node even though a step is available, I might see if I can fix that |
It seems like block steps with errors are just not handled. example pipeline where the step doesn't show up at all: stage('withCredentials') {
echo "Yo"
withCredentials([string(credentialsId: 'my-fake-crendential', variable: 'token')]) {
echo 'test'
}
} Because it's a block step it gets filtered out of the map and because its a blockendnode that has the exception on the node its just not really considered. |
My long term goal was to return StepBlocks as well - how to handle them in the front end is a question. In the short term, we could move Exceptions from StepBlocks to their parent Block. |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Linux RHEL8
Reproduction steps
Make a scripted pipeline with a withCredentials() pointing to a wrong credential ID, causing an error.
Expected Results
I would like to know if it is by desing that errors not related to any pipeline step / stage shouldn't be visible into the pipeline console, but only on the classical console.
Actual Results
Would be great if it could show such errors in the pipeline console, so we could deprecate the classical console. But I'm not sure if it is feasible and / or the intention of the pipeline console.
Anything else?
I would like to avoid situations like this. In this case, I had to point the user to the classical console....
Are you interested in contributing a fix?
No response
The text was updated successfully, but these errors were encountered: