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 riemann-haproxy with Ruby 3.0+ #273

Merged
merged 3 commits into from
Dec 8, 2023
Merged

Fix riemann-haproxy with Ruby 3.0+ #273

merged 3 commits into from
Dec 8, 2023

Conversation

smortex
Copy link
Member

@smortex smortex commented Dec 3, 2023

Ruby 3.0 and newer does not like passing a Hash in place of Keyword Arguments.

More info:
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

Ensure we use a working syntax with all versions of Ruby supported by the gem.

This tool has no tests.  In order to fix it, add a test that prove that
the code is currently wrong.

Extract fetching HAProxy stats from parsing the CSV payload to make
testing easier.
Ruby 3.0 fully separated keyword arguments from positional arguments.
The `riemann-haproxy` tool has been broken with these versions of Ruby.

Use the new syntax to unbreak the tool on these versions of Ruby.
@smortex smortex changed the title Fix riemann-haproxy with Ruby 3.? Fix riemann-haproxy with Ruby 3.0 Dec 3, 2023
@smortex smortex added the bug Something isn't working label Dec 3, 2023
@smortex smortex marked this pull request as ready for review December 3, 2023 03:38
@smortex smortex changed the title Fix riemann-haproxy with Ruby 3.0 Fix riemann-haproxy with Ruby 3.0+ Dec 3, 2023
@smortex
Copy link
Member Author

smortex commented Dec 8, 2023

@jamtur01 may I have a review please 😁? With the switch to Puppet 8 at $WORK we realized this tool is broken with Ruby 3. I would like to do a release to fix it.

Copy link
Member

@jamtur01 jamtur01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jamtur01 jamtur01 merged commit 466e3d3 into main Dec 8, 2023
8 checks passed
@smortex smortex deleted the fix-riemann-haproxy branch January 22, 2024 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants