-
-
Notifications
You must be signed in to change notification settings - Fork 73
Description
I want to discuss #843 (by @lewisbirks) and #838 (by @henriduflot).
While #843 indeed "fixes" the line overflow I pointed, I don't think it is a good idea.
Skipped stages can still take time. Example:
pipeline {
agent any
stages {
stage ('prepare') {
steps {
echo 'stage 1'
}
}
stage('parallel') {
parallel {
stage ('docker') {
when {
expression {
sh(returnStatus: true, script: 'sleep 15s')
return false
}
}
steps {
echo 'stage 2'
}
}
stage ('nested dond') {
steps {
echo 'stage 3'
}
}
stage ('nested dind') {
steps {
echo 'stage 4'
}
}
stage ('docker compose') {
steps {
echo 'stage 5'
}
}
stage ('volta') {
steps {
echo 'stage 6'
}
}
}
}
}
}A real-world example in my case is that I have some stages that check for the existence of certain docker image tags in a remote registry for deciding whether to run the stage or not. Depending on network and the number of retries, it can take noticeable time, and hiding this time from the Stages view makes it worse than otherwise.
Also, depending on the logic, the process which is run for the when.expression could get stuck and take a lot more time than expected, and hiding this information makes it more difficult to spot the issue (imagine yourself analyzing the build trend and trying to identify why certain builds are taking longer than expected).
Can we think of some other solution to avoid overflowing the line, like drawing a straight line instead, but maybe dimmed when the stage is skipped?
Maybe you can still hide durations for skipped stages if they are less than 1s, but I'm not sure what good it would bring.

