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

Show workflow state in UI #1371

Closed
anbraten opened this issue Oct 30, 2022 · 8 comments · Fixed by #1383
Closed

Show workflow state in UI #1371

anbraten opened this issue Oct 30, 2022 · 8 comments · Fixed by #1383
Labels
ui frontend related
Milestone

Comments

@anbraten
Copy link
Member

image

We should show the state of a workflow similar to the state of a single step in front of the name.

In addition finished workflows (successful or failed) could be collapsed by default.

@anbraten anbraten added this to the 1.0.0 milestone Oct 30, 2022
@anbraten anbraten added the ui frontend related label Oct 30, 2022
@dvjn
Copy link
Contributor

dvjn commented Oct 31, 2022

There will be multiple steps in each workflow and they can have a mixture of states.
This opens up two options for the state indicator:

  1. Combine the states into a single representative state with some logic like:
    • If any step is ['started', 'running'], then show blue
    • If any step is ['killed', 'error', 'failure', 'blocked', 'declined'], then show red
    • If all steps ['pending', 'skipped'], then show gray
    • Else show green
  2. Get all the unique states (red, green, blue, gray) and show them in overlapping indicators
    Screenshot 2022-11-01 at 00-48-47 Woodpecker(1)

Thoughts @anbraten ?

@anbraten
Copy link
Member Author

I would go for the first with a logic like:

  • If any step is ['killed', 'error', 'failure', 'blocked', 'declined'], then show red
  • If all steps passed, then show green
  • If any step is ['started', 'running'], then show blue
  • else use gray

@dvjn
Copy link
Contributor

dvjn commented Oct 31, 2022

If all steps passed, then show green will not work since some steps may be skipped while other passed, which should show success.

How about this (my original logic with 1 and 2 swapped)?

  • If any step is ['killed', 'error', 'failure', 'blocked', 'declined'], then show red
  • If any step is ['started', 'running'] (inferred: no step has failed), then show blue
  • If all steps ['pending', 'skipped'] (inferred: no step has failed or is running), then show gray
  • Else (inferred: no step has failed or is running and not all are skipped/pending) show green

@anbraten
Copy link
Member Author

Sounds fine.

@dvjn
Copy link
Contributor

dvjn commented Oct 31, 2022

Sorry my bad, there was no need for this, each workflow already has a state value (which i can directly use).

Got confused by the name of the types in the code. A Pipeline contains PipelineSteps (i.e. Workflow) which contains again PipelineSteps (i.e. WorkflowStep)

@6543
Copy link
Member

6543 commented Nov 1, 2022

@dvjn are you sure you do target latest master branch, as this name-confusions should be mostly solved ...
#745

@6543
Copy link
Member

6543 commented Nov 1, 2022

If you still find relicts, just rename them while you catch them please :)

@lafriks
Copy link
Contributor

lafriks commented Nov 1, 2022

If all steps passed, then show green will not work since some steps may be skipped while other passed, which should show success.

How about this (my original logic with 1 and 2 swapped)?

* If any step is ['killed', 'error', 'failure', 'blocked', 'declined'], then show red

* If any step is ['started', 'running'] (inferred: no step has failed), then show blue

* If all steps ['pending', 'skipped'] (inferred: no step has failed or is running), then show gray

* Else (inferred: no step has failed or is running and not all are skipped/pending) show green

Maybe last two steps could be changed:

  • If any step is ['pending'] (inferred: no step has failed or is running), then show gray
  • Else (inferred: no step has failed or is running or is pending) show green

This way if all steps are skipped would also mean that it is success as all is done, imho

6543 pushed a commit that referenced this issue Nov 5, 2022
@6543 6543 closed this as completed in #1383 Nov 5, 2022
simmstein pushed a commit to simmstein/woodpecker that referenced this issue Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui frontend related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants