[jenkins/blueocean] the url to access stage log is inconsistent

40 views
Skip to first unread message

Henry Xu

unread,
Sep 2, 2021, 5:00:23 AM9/2/21
to Jenkins Developers
Stage log is  one of my favorite features of Blue Ocean. But the inconsistent link to the stage log make me feel annoyed.
As a Jenkins share library maintainer, I want to get the url of stage log and put them in the report to make it easier for users to debug the issue.
I can get the correct stage ID in scripted pipeline, the problem is, if the stage is not in parallel block, it works well to access the log via stage ID. But if the stage is in parallel block then its log cannot be accessed by stage ID, but I have to find its parent parallel node's ID to access the log. It will throw the following error if you try to access it via the stage id:

{ "message" : "Stage 157 not found in pipeline my-pipeline", "code" : 404, "errors" : [ ] }

I did some research myself and find it may have something to do with how blueocean render flow graph. (blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeGraphVisitor.java)
I think a better way for doing this is to provide a general purpose rest API endpoint to allow users to access the stage log via stage id, which will make it more easier for the end user to use this awesome feature.

Henry Xu

unread,
Sep 2, 2021, 5:03:47 AM9/2/21
to Jenkins Developers
Cursor_and_jenkins___Jupiter-Neo-Pipeline_Jupiter-JPT-Pipeline-Dev___Jupiter-JPT-Pipeline-Dev____35.png
A image to make it easier to understand the problem.

Gavin Mogan

unread,
Sep 2, 2021, 3:39:45 PM9/2/21
to Jenkins Developers
I remember that node parser was one of the most tweaked code in all of blue ocean. If I remember correctly it's due to how scripted stages are processed and when they are available. Blue ocean tends to work better with declarative.

That said blue ocean is in maintaince mode. Afaik the only fixes are for cloudbees customers or maybe PRs.

I'm going to recommend https://community.jenkins.io/t/blue-ocean-but-in-classic-ui/96 but this is moving away from a dev topic.

--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/20b8a7a8-e59e-458e-980a-3d6f35dfc606n%40googlegroups.com.

Henry Xu

unread,
Sep 2, 2021, 8:58:58 PM9/2/21
to Jenkins Developers
What I am looking for is a method to get log of stages by their stage id (which I have already find a way to get in the scripted pipeline) and blueocean seem to be the best choice since it already have the API endpoint, but unfortunately the API design is kind of broken.  And yes, if there are plugins that allow to provide the same feature will also work to me. 
Reply all
Reply to author
Forward
0 new messages