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 run mode skip to cylc show #6554

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Jan 13, 2025

Note

schema change Change to the Cylc GraphQL schema - changed TaskRunMode to include simulation and dummy modes

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).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • Very, very small feature.

@wxtim wxtim force-pushed the feat.skip_shown_in_cylc_show branch from 04bd7b1 to b01e496 Compare January 13, 2025 15:37
@wxtim wxtim changed the base branch from master to 8.4.x January 13, 2025 15:37
@wxtim wxtim self-assigned this Jan 13, 2025
@wxtim wxtim added the could be better Not exactly a bug, but not ideal. label Jan 13, 2025
@MetRonnie MetRonnie marked this pull request as draft January 13, 2025 16:07
@wxtim wxtim requested a review from oliver-sanders January 15, 2025 11:54
@wxtim wxtim marked this pull request as ready for review January 15, 2025 11:54
@wxtim wxtim force-pushed the feat.skip_shown_in_cylc_show branch from bfa3254 to 71e3f59 Compare January 16, 2025 11:25
@wxtim wxtim force-pushed the feat.skip_shown_in_cylc_show branch from 9c2f350 to 060a20a Compare January 17, 2025 08:17
@wxtim wxtim requested a review from oliver-sanders January 17, 2025 08:17
@wxtim wxtim marked this pull request as draft January 21, 2025 08:45
wxtim and others added 4 commits January 22, 2025 10:14
broaden the definition of task-mode

Save workflow states to the runtime config object.
fixed TUI test

fix a broken functional test
@wxtim wxtim force-pushed the feat.skip_shown_in_cylc_show branch from 16640a8 to 4ca26a0 Compare January 22, 2025 13:44
@wxtim wxtim changed the base branch from 8.4.x to master January 22, 2025 13:44
@MetRonnie MetRonnie added this to the 8.5.0 milestone Jan 22, 2025
@MetRonnie MetRonnie added the schema change Change to the Cylc GraphQL schema label Jan 22, 2025
@wxtim wxtim marked this pull request as ready for review January 23, 2025 09:02
wxtim and others added 2 commits January 24, 2025 09:15
@MetRonnie
Copy link
Member

MetRonnie commented Feb 17, 2025

UI accompaniment: cylc/cylc-ui#2057

Comment on lines +2452 to +2456
# If the workflow mode is simulation or dummy always
# override the task config:
workflow_run_mode = RunMode.get(self.options)
if workflow_run_mode.value in WORKFLOW_ONLY_MODES:
rtcfg['run mode'] = workflow_run_mode.value
Copy link
Member

Choose a reason for hiding this comment

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

FYI broadcasting a run mode of live or skip seems to override this

Copy link
Member

@oliver-sanders oliver-sanders Feb 26, 2025

Choose a reason for hiding this comment

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

That's correct right?

Copy link
Member

@MetRonnie MetRonnie Feb 26, 2025

Choose a reason for hiding this comment

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

Shouldn't be able to broadcast task run mode = live when the workflow is running in simulation or dummy mode? Not that it matters too much

Copy link
Member

Choose a reason for hiding this comment

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

Ah right, yes. Unfortunately rather hard to prevent but will result in run mode being set (and reported) with an erroneous value :(

async def test_task_run_mode_changes(flow, scheduler, start, capsys):
"""Broadcasting a change of run mode changes run mode shown by cylc show.
"""
opts = SimpleNamespace(
Copy link
Member

@MetRonnie MetRonnie Feb 18, 2025

Choose a reason for hiding this comment

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

We have the ShowOptions object that can be used for this. That way you can omit defaults and it will ensure the options you provide are correct.

ShowOptions = Options(get_option_parser())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could be better Not exactly a bug, but not ideal. schema change Change to the Cylc GraphQL schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants