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

Don't pass rose variables with state ! or !! to Cylc. #171

Merged
merged 1 commit into from
Aug 31, 2022

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Aug 25, 2022

This is a small change with no associated Issue.

It closes an otherwise undocumented bug where variables commented in a rose-suite.conf (with a ! or !!) are passed to Cylc regardless.

Requirements 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 setup.cfg.
  • Appropriate tests are included (unit and/or functional).
  • Appropriate change log entry included.
  • No documentation update required.

@wxtim wxtim added the bug Something isn't working label Aug 25, 2022
@wxtim wxtim added this to the 1.2.0 milestone Aug 25, 2022
@wxtim wxtim self-assigned this Aug 25, 2022
@wxtim wxtim force-pushed the bugfix.rose-comments branch 2 times, most recently from 495d66b to 94f676a Compare August 25, 2022 09:54
@wxtim wxtim modified the milestones: 1.2.0, 1.1.1 Aug 25, 2022
@wxtim wxtim force-pushed the bugfix.rose-comments branch from 94f676a to b2e1dd7 Compare August 25, 2022 09:56
cylc/rose/utilities.py Outdated Show resolved Hide resolved
cylc/rose/utilities.py Outdated Show resolved Hide resolved
'!SINGLE="bar"\n'
'!!DOUBLE="baz"\n'
)
result = run(split(f'cylc validate {str(tmp_path)}'), capture_output=True)
Copy link
Member

Choose a reason for hiding this comment

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

Can use cylc view -p here to simplify the example (no need for the scheduler or scheduling sections).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but you have to turn jinja2 processing on with --jinja2.

Copy link
Member

Choose a reason for hiding this comment

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

(note -p detects #!shebangs and runs the relevant processing)

@wxtim wxtim requested a review from oliver-sanders August 31, 2022 10:03
Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

(Please squash)

replace cylc validate with cylc view --jinja2 in test
@wxtim wxtim force-pushed the bugfix.rose-comments branch from 2f42bb4 to cc395d2 Compare August 31, 2022 10:16
Copy link
Contributor

@datamel datamel left a comment

Choose a reason for hiding this comment

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

Thanks @wxtim.

@datamel datamel merged commit 7627b69 into cylc:master Aug 31, 2022
MetRonnie pushed a commit that referenced this pull request Aug 31, 2022
replace cylc validate with cylc view --jinja2 in test
@wxtim wxtim deleted the bugfix.rose-comments branch September 1, 2022 07:02
wxtim added a commit to wxtim/cylc-rose that referenced this pull request Sep 13, 2022
replace cylc validate with cylc view --jinja2 in test
wxtim added a commit to wxtim/cylc-rose that referenced this pull request Nov 25, 2022
replace cylc validate with cylc view --jinja2 in test
wxtim added a commit to wxtim/cylc-rose that referenced this pull request Nov 25, 2022
replace cylc validate with cylc view --jinja2 in test
wxtim added a commit to wxtim/cylc-rose that referenced this pull request Nov 25, 2022
…mental_improvements_to_testing

* 'master' of github.com:cylc/cylc-rose:
  Remove subprocess from tests (cylc#194)
  update stem - install interface (cylc#193)
  Update tests/unit/test_rose_stem_units.py
  response to review
  Update setup.cfg
  removed never used option
  Improve test coverage for Rose Stem
  reinstall changes to `rose-suite.conf` [tests] (cylc#178)
  Changed the rose stem functional tests to a more pytest-integration style.
  Bump rose dependency to `2.1.*`
  Bump dev version on master to next minor release (cylc#175)
  Fix changelog conflict with 1.1.x (cylc#186)
  Prepare release: 1.1.1 (cylc#183)
  Rose Stem Fixes (cylc#172)
  Don't pass rose variables with state ! or !! to Cylc. (cylc#171)
  Don't pass rose variables with state ! or !! to Cylc. (cylc#171)
  Bump cylc-flow dependency (cylc#173)
  functional tests only cleanup if succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants