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

fix: Quote "3.10" in rebuild-100k.yml to prevent parsing as decimal #1063

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

corneliusroemer
Copy link
Member

@corneliusroemer corneliusroemer commented Apr 20, 2023

It seems that YAML interprets values like 3.10 as decimals, instead of strings (https://yaml.org/spec/1.2.2/#24-tags) So we need to put version strings in quotes in things like python-version: "3.10" Bug where this was root cause: ncov rebuild-100k workflow:

python-version: 3.10
https://github.com/nextstrain/ncov/actions/runs/4721332745/jobs/8374484699#step:3:7

Things seem to have fine while we didn’t use Python version 3.10 as unquoted 3.9 is still 3.9 and cast back to string “3.9”. But trailing 0 gets chopped off.

Testing

  • Test run workflow to see if this fixes it

It seems that YAML interprets values like 3.10 as decimals, instead of strings (https://yaml.org/spec/1.2.2/#24-tags)
So we need to put version strings in quotes in things like `python-version: "3.10"`
Bug where this was root cause: ncov rebuild-100k workflow: https://github.com/nextstrain/ncov/blob/8765cd96660f2a0a923074886899ebda678abc89/.github/workflows/rebuild-100k.yml#L18
https://github.com/nextstrain/ncov/actions/runs/4721332745/jobs/8374484699#step:3:7

Things seem to have fine while we didn’t use Python version 3.10 as unquoted 3.9 is still 3.9 and cast back to string “3.9”. But trailing 0 gets chopped off.
@corneliusroemer corneliusroemer merged commit cdac889 into master Apr 20, 2023
9 checks passed
@corneliusroemer corneliusroemer deleted the quote-version-string-in-workflow branch April 20, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant