-
Notifications
You must be signed in to change notification settings - Fork 55
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 overview shows wrong times and wrong color #362
Comments
@timbrown5 @timja I just recently fixed in-progress steps showing blue instead of green (#345). I'm now seeing this too after taking the latest version. I'm assuming #285 may have changed the status being returned for nodes in this situation? I'll try to debug this later tonight. |
@timbrown5
Unfortunately with that change alone there are a few test regressions that I need to dig into. |
Ahh, that was added to avoid cases where finished steps that were part of an unfinished block were reported as running (i.e. there was no BlockEndNode for the
(as for steps, relations have the start and end to the same StepAtomNode).
should make this check only trigger for blocks. My thinking (maybe wrong) is that if a Block has an end node, it should be finished (by definition?). The StatusAndTimingApi checks for an after node, which we can't assign until the parent block has finished. This causes problems for stages blocks with long running siblings, as it will be reported running until those siblings have finished. |
For the incorrect timing, I think it's similar to the issue I found with the getting the status -if there is no after it is assumed to still be running. I did consider assigning the |
Also, do you have a simple Pipeline to reproduce it? |
The sleep step will appear to be completed even though it's still running. |
Please, test with parallel stages as well. I have identified another weird behavior that perhaps can be solved by a fix for this ticket: The stage |
BTW, this isn't a nested parallel stages. Just a common parallel stages. |
Might be fixed by jenkinsci/pipeline-model-definition-plugin#700 |
but it doesn't fix the wrong color and timing, correct? |
No thats just around skipped stages |
@timbrown5 both suggested solutions had the same issue with the incorrect completed status of stages in a parallel block. Stage Here's the pipeline I used:
|
The check you mention is a hedge - if we didn't find an after node, but know the node/block isn't running, then calculate the status ourselves. We might be able to remove it if we are able to ensure we always get an after node when a step/block is finished (should be possible if the graph is well behaved in this instace - and it's often not).
This should only fire when the node is not running, but obviously this step is running. |
@stuartrowe your issue should be fixed by #364 (if I've understood correctly). If you are able to check, that would be great :). @galindro are you able to share a pipeline which reproduces the timing bug? |
My pipeline is quite complex. It is based on a library that dynamically creates stages and then executes them in parallel. I can't share it due to IP (intelectual property). However, I am sure you can simulate it with just some parallel stages like the one @stuartrowe used because mine is very similar. Put some more sleeps on first stages: e.g.: a time greater than 2 minutes on the first and second and a time greater than 30 minutes on the last. The point here is that it seems to be something very random. The behaviors aren't the same. For every execution they flip. |
@timbrown5 no, unfortunately the stage node is still being marked complete prematurely. Here's the same job running after checking out your branch. Note that the |
This sounds to me a typical issue with memory sharing... Perhaps the same object is being used twice? |
@timbrown5 I tested against your latest commit (225b856) and the stage / step statuses are all correct now in my sample pipeline 🎉 The only minor issue I see left is that the parallel branch I appreciate all of your hard work on these issues! The console view is amazing now 👍 |
Hi @stuartrowe, I think the parallel timing behaviour is due to the StatusAndTiming API: I'm won't be able to look at this for 10 days as I am going away, but happy for someone else to make changes (or to look when I get back). @galindro WRT the duplicate steps issue, could you raise another issue please? It doesn't seem related to the Stating/Timing issues and TBH I'm not even sure where to start with it - maybe you can give copy of the debug logs to help narrow it down? ==Update== |
Just do |
Yes sir! |
Just sent the logs there @timbrown5 / @timja |
Closing as split into other issues |
Yes |
Or tracked as #368 |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
RHEL8
Reproduction steps
Execute any pipeline with multiple steps within multiple parallel stages.
Expected Results
The counter of previous steps shouldn't increment and the undone steps should be blue, not green.
Actual Results
This weird behavior:
Anything else?
No response
Are you interested in contributing a fix?
No response
The text was updated successfully, but these errors were encountered: