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

Add "valid for" states to schema def for cylc set #6095

Merged
merged 1 commit into from
May 8, 2024

Conversation

MetRonnie
Copy link
Member

Follow-up to #5658

This is needed by the UI to disable mutations that are not valid for the workflow state. At present, "set" is not disabled for stopped workflows as it should be:

image

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • No dependency changes
  • Tests are included
  • No changelog entry needed
  • No docs PR needed
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@MetRonnie MetRonnie added the small label May 8, 2024
@MetRonnie MetRonnie added this to the 8.3.0 milestone May 8, 2024
@MetRonnie MetRonnie self-assigned this May 8, 2024
@oliver-sanders
Copy link
Member

oliver-sanders commented May 8, 2024

Dammit, good spot! We should probably have a test to assert this ---- which you've done, great.

@@ -2103,6 +2103,8 @@ class Meta:
- ``started`` implies ``submitted``.
- ``succeeded`` and ``failed`` imply ``started``.
- custom outputs and ``expired`` do not imply any other outputs.

Valid for: paused, running, stopping workflows.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this command is really valid for stopping workflows:

Suggested change
Valid for: paused, running, stopping workflows.
Valid for: paused, running.

Copy link
Member Author

Choose a reason for hiding this comment

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

If waiting for tasks to finish while stopping, is it not valid for users to set task states? I think it can be done from the CLI

Copy link
Member

Choose a reason for hiding this comment

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

Ooh, there is a reasonable point there due to this use case:

I need to orphan a "stuck" job submission

-- https://github.com/cylc/cylc-admin/blob/master/docs/proposal-interventions.md#4-i-need-to-orphan-a-stuck-job-submission

Which could otherwise block shutdown.

Ok, leave as is.

@oliver-sanders oliver-sanders added the doc Documentation label May 8, 2024
@oliver-sanders oliver-sanders merged commit f2f333d into cylc:master May 8, 2024
27 checks passed
@MetRonnie MetRonnie deleted the set-schema branch May 8, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants