Skip to content

check for correct version values when parsing easystack file #3693

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

Merged
merged 8 commits into from
May 22, 2021

Conversation

boegel
Copy link
Member

@boegel boegel commented May 21, 2021

This should help a lot to avoid problems like the ones reported in #3687, since you'll get a clear error message like this:

$ cat test.yml
software:
  binutils:
    toolchains:
      SYSTEM:
        versions:
          2.32:
$ eb --easystack test.yml --experimental
== Temporary log file in case of crash /tmp/eb-jy8oppza/easybuild-gjc50tnl.log
ERROR: Value 2.32 (of type <class 'float'>) obtained for binutils (with system toolchain) does not represent a valid version!
Make sure to wrap the value in single quotes (like '2.32') to avoid that it is interpreted by the YAML parser as a non-string value.

and

$ cat test.yml
software:
  Autotools:
    toolchains:
      SYSTEM:
        versions:
          20150215:
$ eb --easystack test.yml --experimental
== Temporary log file in case of crash /tmp/eb-5qedfcz2/easybuild-tzj9ie4u.log
ERROR: Value 20150215 (of type <class 'int'>) obtained for Autotools (with system toolchain) does not represent a valid version!
Make sure to wrap the value in single quotes (like '20150215') to avoid that it is interpreted by the YAML parser as a non-string value.

@boegel boegel added enhancement easystack Issues and PRs related to easystack files labels May 21, 2021
@boegel boegel added this to the 4.4.0 milestone May 21, 2021
@branfosj
Copy link
Member

Going in, thanks @boegel!

@branfosj branfosj merged commit 7123af1 into easybuilders:develop May 22, 2021
@boegel boegel deleted the easystack_fixes branch May 24, 2021 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easystack Issues and PRs related to easystack files enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants