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

GScan sort running workflows before expandable (containing run dirs) workflows #838

Closed
MetRonnie opened this issue Nov 9, 2021 · 2 comments · Fixed by #1108
Closed

GScan sort running workflows before expandable (containing run dirs) workflows #838

MetRonnie opened this issue Nov 9, 2021 · 2 comments · Fixed by #1108
Assignees
Milestone

Comments

@MetRonnie
Copy link
Member

Describe the bug

At the moment, no-run-name workflows that are running are displayed before stopped non-run-name workflows, but after stopped workflows containing numbered/named run dirs.

If sorting is to be done properly, running workflows should be at the very top of the GScan sidebar.

Also, why do workflows containing run dirs come before no-run-name workflows in the sort order anyway?

Pull requests welcome!
This is an Open Source project - please consider contributing a bug fix
yourself (please read CONTRIBUTING.md before starting any work though).

@MetRonnie MetRonnie added bug Something isn't working small labels Nov 9, 2021
@MetRonnie MetRonnie added this to the 1.0 milestone Nov 9, 2021
@oliver-sanders
Copy link
Member

oliver-sanders commented Nov 16, 2021

Also, why do workflows containing run dirs come before no-run-name workflows in the sort order anyway?

I think this is just awaiting hierarchical sort to be implemented.

If sorting is to be done properly, running workflows should be at the very top of the GScan sidebar.

Yep. I think this was the plan, just not implemented yet?

Although hierarchical sort gets nasty, if you have multiple runs in a hierarchy we would expect them to stay together irrespective of their state. That messes with the sort order somewhat.

For example, what's the correct sort order for this?

a/
   a1:paused
b/
  b1:stopped
  b2:running
c:running
d:stopped

For a flat GScan it would be:

b2:running
c:running
a1:paused
b1:stopped
d:stopped

For a hierarchical GScan I think it should be:

b/
  b1:stopped  # sort up until the last level (i.e. keep the runs in order)
  b2:running
c:running
a/
   a1:paused
d:stopped

Or (my preference):

b/
  b2:running  # sort cascaded right down the hierarchy (i.e. active runs at the top)
  b1:stopped
c:running
a/
   a1:paused
d:stopped

But not:

a/
   a1:paused
b/
  b2:running
c:running
b/  # confusing as heck
  b1:stopped
d:stopped

Suggest if one workflow is running the entire hierarchy should be considered to be running (much like how if one task in a family is running the state of the family is running). And cascade the sorting from head to toe?

The approach of #736 may be useful here?

Would be nice to offer a purely alphabetical sort too.

@MetRonnie MetRonnie removed bug Something isn't working small labels Feb 4, 2022
@MetRonnie MetRonnie modified the milestones: 1.0, 1.x Feb 4, 2022
@oliver-sanders oliver-sanders modified the milestones: 1.x, Pending Jun 8, 2022
@oliver-sanders oliver-sanders modified the milestones: Pending, 1.4.0, 1.x Aug 8, 2022
@oliver-sanders oliver-sanders self-assigned this Oct 28, 2022
@oliver-sanders oliver-sanders modified the milestones: 1.x, 1.4.0 Oct 28, 2022
@wxtim
Copy link
Member

wxtim commented Nov 23, 2022

Note that this example only works if the task foo is being automatically re-submitted - if youtrigger it manually you need $CYLC_TASK_SUBMIT_NUMBER

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

Successfully merging a pull request may close this issue.

3 participants