Skip to content

Conversation

@rockleez
Copy link

@rockleez rockleez commented Nov 26, 2025

Added support for a paused stages

  • Displays the paused glyph (two bars) instead of the running spinner when a stage is waiting for input

Fixes #967

Testing done

  • Ran a test pipeline that included the input steps in a parallel and stage view.
  • Validated that the timer and pipeline status continued counting up
  • Validated that the Pipeline Overview, Console view, Stages view reflected the paused status icon
  • Validated that the pipeline remained in the In Progress state
  • Added a unit test

Before:
Stage appears as running even though its waiting for input
image

After:
Stage appears as paused on Pipeline Overview and Console view
image

Stage appears as paused on Stages view
image

Including parallel branches
image

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@rockleez rockleez marked this pull request as ready for review November 27, 2025 12:53
@rockleez rockleez requested a review from a team as a code owner November 27, 2025 12:53
@timja timja added the enhancement New feature or request label Dec 2, 2025
@timja timja changed the title fix: added support for paused status in stages that are waiting for i… Added support for paused status in stages that are waiting for input Dec 2, 2025
@janfaracik
Copy link
Member

Looks fine to me on a frontend POV now - any thoughts on Java @timja @lewisbirks

Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey looks good couple of minor things, but close.

List<PipelineStageInternal> stages = getPipelineNodes(builder);

// Set the builder on each stage so they can check for paused steps
if (builder instanceof PipelineStepBuilderApi stepBuilder) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A separate PR could refactor the need for this instanceof check pretty easily, there's only one implementation and the indirection is no longer needed

if (children != null && !children.isEmpty()) {
for (PipelineStage child : children) {
if (child.state == PipelineState.PAUSED) {
return true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we get some test coverage for this please?

A pipeline that sets an input step on it and validates the stage is now paused.

this.agent = aAgent;
}

public void setBuilder(PipelineStepBuilderApi builder) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be avoided by doing the refactoring mentioned in PipelineGraphApi comment and then you could just pass the builder in the constructor (or another constructor) as I'd prefer not to be mutating state

}

public PipelineStage toPipelineStage(List<PipelineStage> children, String runUrl) {
boolean waitingForInput = isWaitingForInput(children);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we only do this check if there is an InputAction attached to the WorkflowRun?

I think that should be optimisable so this check is only run over stages that could be waiting for input?

@samrocketman
Copy link
Member

@samrocketman
Copy link
Member

samrocketman commented Dec 11, 2025

It's a bit challenging to relay how good this would be.

An example: you have a pipeline with 30 stages stacked in parallel. If only one stage is paused for input, then you must either wait for most of the stages to finish before you can answer (the "last" one running is input) or you need to manually open each of the 30 stages. The last one is a bit tedious to identify in the log steps there's a pause indicating input is required.

@timja
Copy link
Member

timja commented Dec 11, 2025

It's a bit challenging to relay how good this would be.

An example: you have a pipeline with 30 stages stacked in parallel. If only one stage is paused for input, then you must either wait for most of the stages to finish before you can answer (the "last" one running is input) or you need to manually open each of the 30 stages. The last one is a bit tedious to identify in the log steps there's a pause indicating input is required.

😄, it should be in soon, only a bit of polish needed.

@timja
Copy link
Member

timja commented Dec 11, 2025

Note: need to confirm if this fixes #348

@sgleske-ias
Copy link

sgleske-ias commented Dec 11, 2025

I was going to test this with incrementals but incrementals apparently only supports Jenkins weekly releases. I get this error on LTS Jenkins Version 2.528.3

Failed to load: Pipeline Graph View Plugin (pipeline-graph-view 745.v25917da_3f244)
 - Jenkins (2.534) or higher required

(note: I am samrocketman; this is my proprietary GitHub profile)

@timja
Copy link
Member

timja commented Dec 11, 2025

It’s not that incrementals supports weekly’s it’s that there’s a wider design rework going on which this plugin is integrating with so has needed to depend on a more recent release in its latest versions.

@sgleske-ias
Copy link

sgleske-ias commented Dec 11, 2025

Sounds good I will test in the next LTS update if this PR is not merged by that time. I have a several non-prod test environments but at the moment we generally ship LTS (I could consider making updates to support weekly at some point but for now it's all revolving around LTS).

@rockleez
Copy link
Author

I've made the requested changes, and manually validated via a test pipeline that functionality is still the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stage should show pause icon when wating for input

5 participants