Skip to content
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

Pipeline graph overview & console are blank/empty if there is no stage #540

Open
sparrowt opened this issue Oct 21, 2024 · 0 comments
Open

Comments

@sparrowt
Copy link

sparrowt commented Oct 21, 2024

Jenkins and plugins versions report

Environment
jenkins version = 2.462.2
pipeline-graph-view = 340.v28cecee8b_25f

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu 22.04

Reproduction steps

  1. Have a job whose scripted Jenkinsfile does not define any stage blocks but just does something simple e.g. calling an API / some other groovy code:
// This is a contrived example but the key thing is there are only top-level steps without being in a stage or node
// e.g. a silly check using `pullRequest` object from `pipeline-github` plugin but this could be absolutely anything at all
// The problem will repro without this plugin if you simply define a jenkinsfile with a single `echo` or `error` call in it too.
echo "PR title: ${pullRequest.title}"
if (pullRequest.title.startsWith('Foo')) {
    error('Nobody likes foo')
} else {
    echo 'All is well'
}
  1. View this job in the 'Pipeline Overview' (default as shown when clicking the link from GitHub checks which goes to /job/foochecker/job/PR-123/1/display/ redirect for example) or 'Pipeline Console' view, hoping to see what actually happened

Expected Results

In this case Blue Ocean will show no graph but will still list the steps at the bottom so you can see what actually happened.

I would expect the same in this case e.g.

  • in Pipeline Console the steps should be visible on the right with presumably some kind of placeholder item in the side bar given there's no stage
  • in Pipeline Overview either a placeholder node on the graph, or even just a link through to somewhere where you can see the steps would help

The screenshots below are from when the job errored, but the same applies when it succeeds - you still should be able to easily get to a place where the echo output can be seen.

Actual Results

In both cases you see almost nothing and it is quite difficult to actually get to somewhere where you can see the echo or error output

  1. Pipeline Overview shows nothing beyond this empty graph:
    Image
  2. Pipeline Console shows nothing useful either:
    Image

Anything else?

There has been prior discussion about what seems like a similar case on #357 which then had these 2 PRs referencing it #363 and #377

However:

  1. that ticket seems to be specifically about the 'error' case - if the job succeeds, it would still be better not to have an entirely blank page but rather to be able to see the steps including echo output for example.
  2. the merged PR (Return root stages if they have child steps. #377) hasn't fixed this case because I'm running a more recent version than that and it still repros (edit: ah I've just noticed that Revert "Return root stages if they have child steps." #380 reverted it because it regressed something else)

Are you interested in contributing a fix?

No response

@sparrowt sparrowt changed the title Pipeline graph overview and console are blank/empty if there is no stage Pipeline graph overview & console are blank/empty if there is no stage Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant