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

Play should have no cylc rose options #6068

Merged
merged 4 commits into from
Apr 17, 2024

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Apr 16, 2024

& Reload should not mess with Cylc Rose CLI options.

Companion to cylc/cylc-rose#312

Cylc Play was (according to the proposal doc) never intended to take Rose config CLI options (-O, -D and -S).

For example:

cylc install -S 'foo=1'
cylc play -S 'foo=2' --pause

Would lead to foo = 2 being stored on the scheduler as self.options.rose_template_vars: If we then do

cylc reinstall -S 'foo=3'
cylc reload  

# or

cylc vr -S 'foo=3'

Will lead to the installed files updating, but reload cannot update the self.options.rose_template_vars object created by Cylc Play, so we cannot get rid of foo=2.

Without the scheduler storing these items, reload can examine all the files and get the updated value.

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 not included:
    • Cylc play having rose options was never tested, or intended to work.
    • Tests for the removal of the Cylc-Rose config items were only manual when they were added.
  • CHANGES.md entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

The logic removed was designed to handle option config
being either a new Options object, or just a dict. There
are no options defined as just a dict anymore.
@wxtim wxtim self-assigned this Apr 16, 2024
@wxtim wxtim added this to the 8.2.6 milestone Apr 16, 2024
@wxtim wxtim marked this pull request as draft April 16, 2024 13:25
@@ -309,12 +309,8 @@ def get_option_parser(add_std_opts: bool = False) -> COP:
argdoc=[WORKFLOW_ID_ARG_DOC]
)

options = parser.get_cylc_rose_options() + PLAY_OPTIONS
for option in options:
if isinstance(option, OptionSettings):
Copy link
Member Author

Choose a reason for hiding this comment

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

There are no longer any options stored as Dicts rather than OptionSettings objects :. this is redundant.

@wxtim wxtim added bug Something is wrong :( small labels Apr 16, 2024
@wxtim wxtim marked this pull request as ready for review April 16, 2024 14:16
Copy link
Member

@MetRonnie MetRonnie left a comment

Choose a reason for hiding this comment

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

Makes sense to me, could do with a changelog entry I think

@oliver-sanders
Copy link
Member

(breaking change entry I'm afraid)

@MetRonnie MetRonnie merged commit 40139b1 into cylc:8.2.x Apr 17, 2024
21 of 23 checks passed
@wxtim wxtim deleted the fix.play-should_have_no_cylc_rose_options branch April 17, 2024 11:46
wxtim added a commit to wxtim/cylc that referenced this pull request Apr 22, 2024
* upstream/master: (25 commits)
  Delete public DB if private DB does not exist on scheduler start (cylc#6070)
  Include xtrigger function signatures in `cylc config` (cylc#6071)
  Add Nano syntax highlighter (cylc#6072)
  Play should have no cylc rose options (cylc#6068)
  tests/integration: address urwid deprecation warning (cylc#6063)
  Bump dev version
  Prepare release 8.2.5
  add mailmap entry
  Tutorials: avoid validation errors due to implicit tasks
  Update CONTRIBUTING.md
  Update xtrigger_mgr.py documentation
  Another small tweak.
  Tweak previous.
  Tutorials: increase sleep and don't sleep in CI
  Fix bad doctests
  tutorial: make the tutorial workflow run a little slower
  Style tweaks.
  Simply workflow-state code a bit.
  Add unit tests for workflow-state.
  Add to doc string.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :( small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants