Skip to content

Fix truncation issue in CI configuration entries#306

Merged
hoppergee merged 2 commits into
jeremytregunna:masterfrom
petergoldstein:bugfix/ci_truncation_issue
Mar 12, 2022
Merged

Fix truncation issue in CI configuration entries#306
hoppergee merged 2 commits into
jeremytregunna:masterfrom
petergoldstein:bugfix/ci_truncation_issue

Conversation

@petergoldstein
Copy link
Copy Markdown
Contributor

What does this PR do?

Zero terminated float values in GitHub Actions CI configurations are truncated, leading to unexpected behavior. In this instance this results loading an unexpected Ruby or ActiveModel version for several CI matrix entries.

Specifically, the unquoted '3.0' is interpreted as '3', and the latest Ruby 3 version - at this time of writing 3.1.1 - is loaded. To ensure that a 3.0.x version is loaded, we need to add quotes.

In the ActiveModel case, use of an unquoted '6.0' is interpreted as '6' and ActiveModel 6.1.4.6 is loaded at this time. To ensure a 6.0.x version is loaded, we need to add quotes.

The unquoted '7.0' would have similar problems if and when a Rails 7.1.x is released..

Where should a reviewer start?

Look at the Actions tab for the CI runs and examine the setup Ruby step in detail for recent runs. Once this runs, compare.

Screenshots

Note that the '3.0' is truncated and Ruby 3.1.1 is being loaded:

Screen Shot 2022-03-10 at 9 36 36 AM

Zero terminated float values in GitHub Actions CI configurations are truncated, leading to unexpected behavior.  In this instance this results loading an unexpected Ruby or ActiveModel version for several CI matrix entries.

Specifically, the unquoted '3.0' is interpreted as '3', and the latest Ruby 3 version - at this time of writing 3.1.1 - is loaded.  To ensure that a 3.0.x version is loaded, we need to add quotes.

In the ActiveModel case, use of an unquoted '6.0' is interpreted as '6' and ActiveModel 6.1.4.6 is loaded at this time.  To ensure a 6.0.x version is loaded, we need to add quotes.

The unquoted '7.0' would have similar problems if and when a Rails 7.1.x is released..
@hoppergee
Copy link
Copy Markdown
Collaborator

Ahh, didn't know that before. Thank you @petergoldstein

Can you help me change all those versions to quoted for keeping the style unified?

@petergoldstein
Copy link
Copy Markdown
Contributor Author

@hoppergee Sure. I've quoted all the numerical values.

@hoppergee
Copy link
Copy Markdown
Collaborator

Thanks

@hoppergee hoppergee merged commit b68881d into jeremytregunna:master Mar 12, 2022
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.

2 participants