Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Address Rails 7.1 deprecation warning in elasticsearch-rails #1067

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

Conversation

@maciek-rr
Copy link
Contributor

@maciek-rr maciek-rr commented Dec 27, 2023
edited
Loading

Description

This PR switches the elasticsearch-rails gem to use a new signature of the ActiveSupport::LogSubscriber#color
method when called in an app using Rails 7.1+.

With older Rails, the gem uses the working, old signature.

An example of a deprecation warning visible in 7.1 apps

DEPRECATION WARNING: Bolding log text with a positional boolean is deprecated and will be removed in Rails 7.2. Use an option hash instead (eg. `color("my text", :red, bold: true)`). (called from query_time_boundaries at timeseries/frequency_calculator.rb:44)

aub, DmytroVasin, SiriusDely, N0xFF, joe81, spuyet, and Adverbly reacted with thumbs up emoji
This PR switches the elasticsearch-rails gem to use a new signature
of the ActiveSupport::LogSubscriber#color method when called in an
app using Rails 7.1+. With older Rails, the gem uses the working, old
signature.
Copy link

spuyet commented May 1, 2024

@picandocodigo do you plan to merge that MR into main ?

I see that you're working on a new version for this gem, do we have any kind if ETA for the release ? thx 😄

@picandocodigo picandocodigo merged commit 98b6ce0 into elastic:main May 14, 2024
@maciek-rr maciek-rr deleted the misc/address-rails-7-1-log-subscriber-deprecation branch May 14, 2024 13:26
Copy link

r-plus commented Jun 28, 2024

hello

Do you have any plan about this PR backport to 7.x branch?

spuyet, DmytroVasin, and Adverbly reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picandocodigo picandocodigo picandocodigo approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /