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

Update YAML.safe_load call to be compatible with Ruby 3.1 #900

Merged
merged 1 commit into from
Jul 27, 2022

Conversation

jhoos
Copy link
Contributor

@jhoos jhoos commented Jul 19, 2022

What are you trying to accomplish with this PR?

When krane is run under Ruby 3.1, and is invoked with an argument like --bindings=@somefile, it crashes, because the binding code is loading somefile using a deprecated call format for YAML.safe_load that is no longer valid in Ruby 3.1.

This is also causing unit test failures when the tests are run under Ruby 3.1.

How is this accomplished?

The safe_load call is fixed to use the current arguments, which are valid for Ruby 2.7 and later.

What could go wrong?

Probably nothing since there's test coverage for this. The PR also adds Ruby 3.1 to the GitHub action test matrix to cover this case.

Also adds Ruby 3.1 tests to the GitHub actions matrix (similar to #887, so this PR can likely supplant that one)
@jhoos jhoos requested a review from a team as a code owner July 19, 2022 20:11
@jhoos jhoos requested review from JamesOwenHall and RRethy and removed request for a team July 19, 2022 20:11
@jhoos
Copy link
Contributor Author

jhoos commented Jul 19, 2022

This PR can replace #887, as it adds the same GitHub action configuration, and fixes the error that the author of that PR likely saw.

@jpfourny
Copy link
Contributor

@jhoos
Copy link
Contributor Author

jhoos commented Jul 27, 2022

@jpfourny Releasing a new version would be the easiest way for our clusters to consume it. I wasn't sure if I'd be overstepping by doing that but if you want I'd be happy to do so.

@jhoos
Copy link
Contributor Author

jhoos commented Jul 27, 2022

I will open a new PR to cut a 2.4.9 release

@jhoos jhoos merged commit ce528ca into master Jul 27, 2022
@jhoos jhoos deleted the psych_safe_load_args branch July 27, 2022 16:59
@jhoos jhoos mentioned this pull request Jul 27, 2022
@jhoos jhoos mentioned this pull request Jul 27, 2022
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems July 27, 2022 17:35 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems September 26, 2023 12:54 Inactive
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

3 participants