ci: Ansible version must be string, not float [citest_skip]#170
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 updates the GitHub Actions TFT workflow to represent Ansible versions as YAML strings instead of numeric literals, preventing unintended truncation of version numbers like 2.20 to 2.2 in the CI matrix. Flow diagram for YAML version parsing before and after changeflowchart TD
A[Load tft.yml] --> B[Parse YAML]
B --> C{ansible_version type}
C -->|"Numeric literal before"| D[Version 2.20 parsed as float 2.2]
D --> E[CI uses wrong Ansible 2.2]
E --> F[Playbook execution may fail]
C -->|"Quoted string after"| G[Version '2.20' preserved as string]
G --> H[CI uses correct Ansible 2.20]
H --> I[Playbook execution matches expected platform support]
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 centralizing these Ansible version strings (e.g., via a matrix include anchor or reusable workflow) so you don't have to keep multiple, duplicated hard‑coded version lists in sync across future CI changes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider centralizing these Ansible version strings (e.g., via a matrix include anchor or reusable workflow) so you don't have to keep multiple, duplicated hard‑coded version lists in sync across future CI changes.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: