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

make RoseStemVersionException print the correct missing variable #252

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Aug 24, 2023

Fixes a small bug in an error printout:

How to reproduce:

mkdir -p "${HOME}/example/rose-stem"
touch "${HOME}/example/rose-stem/flow.cylc"
touch "${HOME}/example/rose-stem/rose-suite.conf"

rose stem \
    --source=foo="${HOME}/example"\
    --workflow-name=$(uuidgen)

Will return an error, but at the moment the error is:

RoseStemVersionException: Running rose-stem version 1 but suite is does not have ROSE_VERSION set in the rose-suite.conf

But this is wrong and unhelpful: The variable should be ROSE_STEM_VERSION.

Additionally I've made RoseStemVersionException inherit CylcError so that we can suppress the traceback, unless in debug mode.

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 Any test of this change would either be overkill, or trivial.
  • CHANGES.md entry included This is effectively an internal documentation change.
  • ~Cylc-Doc ~ This is related to documentation changes but does not itself require them.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@wxtim wxtim self-assigned this Aug 24, 2023
@wxtim wxtim added documentation Improvements or additions to documentation small labels Aug 24, 2023
@wxtim wxtim added this to the 1.3.1 milestone Aug 24, 2023
@oliver-sanders oliver-sanders merged commit af64213 into cylc:1.3.x Aug 29, 2023
5 checks passed
wxtim added a commit to wxtim/cylc-rose that referenced this pull request Oct 9, 2023
…ow_--defines_no_equal

* upstream/1.3.x:
  make RoseStemVersionException print the correct missing variable (cylc#252)
  Update tests/unit/test_rose_stem_units.py
  Allow top level  settings in CLI Config (cylc#221)
  Prevent accidental manual setting of project name with -s=
  Fix flake8
  Bump dev version
  Add missing dependency on ansimarkup
  Prepare release 1.3.0
  Bump pypa/gh-action-pypi-publish from 1.8.7 to 1.8.8 (cylc#236)
  Permitted warnings about root-dir for all versions of Cylc. (cylc#231)
  Bump pypa/gh-action-pypi-publish from 1.8.6 to 1.8.7 (cylc#235)
  Bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6 (cylc#228)
  1.3.0 (cylc#219)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants