ci: Ansible version must be string, not float [citest_skip]#590
Merged
Conversation
The ansible version is specified as a YAML floating point number. This causes `2.20` to be converted to `2.2` which breaks platforms that use ansible 2.20. Ensure it and similar version numbers are specified in YAML as strings. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR fixes CI Ansible version handling by ensuring all matrix-defined Ansible versions in the GitHub Actions workflow are represented as YAML strings rather than floating-point numbers to prevent unintended truncation (e.g., 2.20 → 2.2). File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider scanning other workflow files for numeric version fields (not just
ansible_version) and consistently quoting them as strings to avoid similar YAML float parsing issues elsewhere. - To make the intent harder to miss for future edits, you could expand the new comment (or add one near the matrix) to explicitly mention that YAML interprets unquoted version numbers like
2.20as floats and truncates them.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider scanning other workflow files for numeric version fields (not just `ansible_version`) and consistently quoting them as strings to avoid similar YAML float parsing issues elsewhere.
- To make the intent harder to miss for future edits, you could expand the new comment (or add one near the matrix) to explicitly mention that YAML interprets unquoted version numbers like `2.20` as floats and truncates them.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ansible version is specified as a YAML floating point number. This causes
2.20to be converted to2.2which breaks platforms that use ansible 2.20.Ensure it and similar version numbers are specified in YAML as strings.
Signed-off-by: Rich Megginson rmeggins@redhat.com
Summary by Sourcery
CI: