Skip to content

Raise minimum required ruby version - #4288

Merged
daipom merged 1 commit into
fluent:masterfrom
kenhys:fix-required-ruby-version
Sep 8, 2023
Merged

Raise minimum required ruby version#4288
daipom merged 1 commit into
fluent:masterfrom
kenhys:fix-required-ruby-version

Conversation

@kenhys

@kenhys kenhys commented Sep 5, 2023

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:

N/A

What this PR does / why we need it:

The service discovery plugin helper use Array#prepend, it means that the ruby version must be 2.5 or later precisely.

fluentd.work/lib/fluent/plugin_helper/service_discovery.rb:71:in
service_discovery_configure': undefined method prepend' for
[]:Array (NoMethodError) from
/work/fluent/fluentd/fluentd.work/lib/fluent/plugin/out_

Docs Changes:

fluent/fluentd-docs-gitbook#471

Release Note:

N/A

@cosmo0920 cosmo0920 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch! 👍

@daipom

daipom commented Sep 6, 2023

Copy link
Copy Markdown
Contributor

Thanks!
Shouldn't we update the minimum version to 2.7 since the minimum version tested in CI is 2.7?

@kenhys

kenhys commented Sep 6, 2023

Copy link
Copy Markdown
Contributor Author

It depends on perspective:

  • Precisely set minimum:
    • Pros: can run a bit older even though already reached EOL.
    • Cons: allow non-supported version to run with.
  • Only set CI certified version:
    • Pros: can recommend verified version with CI.
    • Cons: cut off ruby version actually work.

Created PR based on the former, but reconsidered it should be the latter.

Thanksm, I'll fix it.

The service discovery plugin helper use Array#prepend, it means that
the ruby version must be 2.5 or later precisely.

   fluentd.work/lib/fluent/plugin_helper/service_discovery.rb:71:in
   `service_discovery_configure': undefined method `prepend' for
   []:Array (NoMethodError) from
   /work/fluent/fluentd/fluentd.work/lib/fluent/plugin/out_

NOTE: It works with Ruby 2.5 or later, but 2.x had already
reached EOL. At least, it may better to set verified version with CI.

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
@kenhys
kenhys force-pushed the fix-required-ruby-version branch from a933dff to 4b2b2dd Compare September 6, 2023 07:41
@kenhys

kenhys commented Sep 6, 2023

Copy link
Copy Markdown
Contributor Author

Fixed.

@daipom daipom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It depends on perspective:

* Precisely set minimum:
  
  * Pros: can run a bit older even though already reached EOL.
  * Cons: allow non-supported version to run with.

* Only set CI certified version:
  
  * Pros: can recommend verified version with CI.
  * Cons: cut off ruby version actually work.

Created PR based on the former, but reconsidered it should be the latter.

Thanksm, I'll fix it.

I see!
At least, we need this fix.

We can think about whether we should update the version to 2.7 or not later.

@daipom

daipom commented Sep 6, 2023

Copy link
Copy Markdown
Contributor

Fixed.

Thanks!

@kenhys

kenhys commented Sep 6, 2023

Copy link
Copy Markdown
Contributor Author

We can think about whether we should update the version to 2.7 or not later.

When td-agent reached EOL (Dec, 2023), we will drop 2.7 from CI.

@daipom
daipom merged commit eb30a6e into fluent:master Sep 8, 2023
@daipom daipom modified the milestone: v1.16.3 Oct 10, 2023
@daipom daipom added this to the v1.17.0 milestone Oct 30, 2023
@kenhys
kenhys deleted the fix-required-ruby-version branch December 26, 2024 05:03
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.

3 participants