Skip to content

Conversation

@depfu
Copy link
Contributor

@depfu depfu bot commented Aug 14, 2025

Jira issue: https://issues.redhat.com/browse/THREESCALE-12186


🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ rails (7.1.6 β†’ 8.0.2.1) Β· Repo

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

✳️ webrick (1.8.2 β†’ 1.9.2) Β· Repo

Sorry, we couldn't find anything useful about this release.

↗️ actioncable (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

Release Notes

8.0.1 (from changelog)

More info than we can show here.

8.0.0.1 (from changelog)

More info than we can show here.

8.0.0 (from changelog)

More info than we can show here.

7.2.2.1 (from changelog)

More info than we can show here.

7.2.2 (from changelog)

More info than we can show here.

7.2.1.2 (from changelog)

More info than we can show here.

7.2.1.1 (from changelog)

More info than we can show here.

7.2.1 (from changelog)

More info than we can show here.

7.2.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ actionmailbox (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

↗️ actionmailer (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

Security Advisories 🚨

🚨 Possible ReDoS vulnerability in block_format in Action Mailer

There is a possible ReDoS vulnerability in the block_format helper in Action Mailer. This vulnerability has been assigned the CVE identifier CVE-2024-47889.

Impact

Carefully crafted text can cause the block_format helper to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade or apply the relevant patch immediately.

Ruby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 requires Ruby 3.2 or greater so is unaffected.

Releases

The fixed releases are available at the normal locations.

Workarounds

Users can avoid calling the block_format helper or upgrade to Ruby 3.2

Credits

Thanks to yuki_osaki for the report!

Release Notes

8.0.1 (from changelog)

More info than we can show here.

8.0.0.1 (from changelog)

More info than we can show here.

8.0.0 (from changelog)

More info than we can show here.

7.2.2.1 (from changelog)

More info than we can show here.

7.2.2 (from changelog)

More info than we can show here.

7.2.1.2 (from changelog)

More info than we can show here.

7.2.1.1 (from changelog)

More info than we can show here.

7.2.1 (from changelog)

More info than we can show here.

7.2.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ actionpack (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

Security Advisories 🚨

🚨 Possible Content Security Policy bypass in Action Dispatch

There is a possible Cross Site Scripting (XSS) vulnerability in the content_security_policy helper in Action Pack.

Impact

Applications which set Content-Security-Policy (CSP) headers dynamically from untrusted user input may be vulnerable to carefully crafted inputs being able to inject new directives into the CSP. This could lead to a bypass of the CSP and its protection against XSS and other attacks.

Releases

The fixed releases are available at the normal locations.

Workarounds

Applications can avoid setting CSP headers dynamically from untrusted input, or can validate/sanitize that input.

Credits

Thanks to ryotak for the report!

🚨 Possible Content Security Policy bypass in Action Dispatch

There is a possible Cross Site Scripting (XSS) vulnerability in the content_security_policy helper in Action Pack.

Impact

Applications which set Content-Security-Policy (CSP) headers dynamically from untrusted user input may be vulnerable to carefully crafted inputs being able to inject new directives into the CSP. This could lead to a bypass of the CSP and its protection against XSS and other attacks.

Releases

The fixed releases are available at the normal locations.

Workarounds

Applications can avoid setting CSP headers dynamically from untrusted input, or can validate/sanitize that input.

Credits

Thanks to ryotak for the report!

🚨 Possible ReDoS vulnerability in HTTP Token authentication in Action Controller

There is a possible ReDoS vulnerability in Action Controller's HTTP Token authentication. This vulnerability has been assigned the CVE identifier CVE-2024-47887.

Impact

For applications using HTTP Token authentication via authenticate_or_request_with_http_token or similar, a carefully crafted header may cause header parsing to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade or apply the relevant patch immediately.

Ruby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 depends on Ruby 3.2 or greater so is unaffected.

Releases

The fixed releases are available at the normal locations.

Workarounds

Users on Ruby 3.2 are unaffected by this issue.

Credits

Thanks to scyoon for reporting

🚨 Possible ReDoS vulnerability in query parameter filtering in Action Dispatch

There is a possible ReDoS vulnerability in the query parameter filtering routines of Action Dispatch. This vulnerability has been assigned the CVE identifier CVE-2024-41128.

Impact

Carefully crafted query parameters can cause query parameter filtering to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade or apply the relevant patch immediately.

Ruby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 depends on Ruby 3.2 or greater so is unaffected.

Releases

The fixed releases are available at the normal locations.

Workarounds

Users on Ruby 3.2 are unaffected by this issue.

Credits

Thanks to scyoon for the report and patches!

Release Notes

8.0.1 (from changelog)

More info than we can show here.

8.0.0.1 (from changelog)

More info than we can show here.

8.0.0 (from changelog)

More info than we can show here.

7.2.2.1 (from changelog)

More info than we can show here.

7.2.2 (from changelog)

More info than we can show here.

7.2.1.2 (from changelog)

More info than we can show here.

7.2.1.1 (from changelog)

More info than we can show here.

7.2.1 (from changelog)

More info than we can show here.

7.2.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ actiontext (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

Security Advisories 🚨

🚨 Possible ReDoS vulnerability in plain_text_for_blockquote_node in Action Text

There is a possible ReDoS vulnerability in the plain_text_for_blockquote_node helper in Action Text. This vulnerability has been assigned the CVE identifier CVE-2024-47888.

Impact

Carefully crafted text can cause the plain_text_for_blockquote_node helper to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade or apply the relevant patch immediately.

Ruby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 depends on Ruby 3.2 or greater so is unaffected.

Releases

The fixed releases are available at the normal locations.

Workarounds

Users can avoid calling plain_text_for_blockquote_node or upgrade to Ruby 3.2

Credits

Thanks to ooooooo_q for the report!

Release Notes

8.0.1 (from changelog)

More info than we can show here.

8.0.0.1 (from changelog)

More info than we can show here.

8.0.0 (from changelog)

More info than we can show here.

7.2.2.1 (from changelog)

More info than we can show here.

7.2.2 (from changelog)

More info than we can show here.

7.2.1.2 (from changelog)

More info than we can show here.

7.2.1.1 (from changelog)

More info than we can show here.

7.2.1 (from changelog)

More info than we can show here.

7.2.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ actionview (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

Release Notes

8.0.1 (from changelog)

More info than we can show here.

8.0.0.1 (from changelog)

More info than we can show here.

8.0.0 (from changelog)

More info than we can show here.

7.2.2.1 (from changelog)

More info than we can show here.

7.2.2 (from changelog)

More info than we can show here.

7.2.1.2 (from changelog)

More info than we can show here.

7.2.1.1 (from changelog)

More info than we can show here.

7.2.1 (from changelog)

More info than we can show here.

7.2.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ activejob (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

Release Notes

8.0.1 (from changelog)

More info than we can show here.

8.0.0.1 (from changelog)

More info than we can show here.

8.0.0 (from changelog)

More info than we can show here.

7.2.2.1 (from changelog)

More info than we can show here.

7.2.2 (from changelog)

More info than we can show here.

7.2.1.2 (from changelog)

More info than we can show here.

7.2.1.1 (from changelog)

More info than we can show here.

7.2.1 (from changelog)

More info than we can show here.

7.2.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ activemodel (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

Release Notes

8.0.1 (from changelog)

More info than we can show here.

8.0.0.1 (from changelog)

More info than we can show here.

8.0.0 (from changelog)

More info than we can show here.

7.2.2.1 (from changelog)

More info than we can show here.

7.2.2 (from changelog)

More info than we can show here.

7.2.1.2 (from changelog)

More info than we can show here.

7.2.1.1 (from changelog)

More info than we can show here.

7.2.1 (from changelog)

More info than we can show here.

7.2.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ activerecord (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

Security Advisories 🚨

🚨 Active Record logging vulnerable to ANSI escape injection

This vulnerability has been assigned the CVE identifier CVE-2025-55193

Impact

The ID passed to find or similar methods may be logged without escaping. If this is directly to the terminal it may include unescaped ANSI sequences.

Releases

The fixed releases are available at the normal locations.

Credits

Thanks to lio346 from Unit 515 of OPSWAT for reporting this vulnerability

🚨 Active Record logging vulnerable to ANSI escape injection

This vulnerability has been assigned the CVE identifier CVE-2025-55193

Impact

The ID passed to find or similar methods may be logged without escaping. If this is directly to the terminal it may include unescaped ANSI sequences.

Releases

The fixed releases are available at the normal locations.

Credits

Thanks to lio346 from Unit 515 of OPSWAT for reporting this vulnerability

Release Notes

8.0.1 (from changelog)

More info than we can show here.

8.0.0.1 (from changelog)

More info than we can show here.

8.0.0 (from changelog)

More info than we can show here.

7.2.2.1 (from changelog)

More info than we can show here.

7.2.2 (from changelog)

More info than we can show here.

7.2.1.2 (from changelog)

More info than we can show here.

7.2.1.1 (from changelog)

More info than we can show here.

7.2.1 (from changelog)

More info than we can show here.

7.2.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ activestorage (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

Security Advisories 🚨

🚨 Active Storage allowed transformation methods that were potentially unsafe

Active Storage attempts to prevent the use of potentially unsafe image transformation methods and parameters by default.

The default allowed list contains three methods allowing for the circumvention of the safe defaults which enables potential command injection vulnerabilities in cases where arbitrary user supplied input is accepted as valid transformation methods or parameters.

This has been assigned the CVE identifier CVE-2025-24293.

Versions Affected: >= 5.2.0
Not affected: < 5.2.0
Fixed Versions: 7.1.5.2, 7.2.2.2, 8.0.2.1

Impact

This vulnerability impacts applications that use Active Storage with the image_processing processing gem in addition to mini_magick as the image processor.

Vulnerable code will look something similar to this:

<%= image_tag blob.variant(params[:t] => params[:v]) %>

Where the transformation method or its arguments are untrusted arbitrary input.

All users running an affected release should either upgrade or use one of the workarounds immediately.

Releases

The fixed releases are available at the normal locations.

Workarounds

Consuming user supplied input for image transformation methods or their parameters is unsupported behavior and should be considered dangerous.

Strict validation of user supplied methods and parameters should be performed as well as having a strong ImageMagick security policy deployed.

Credits

Thank you lio346 from Unit 515 of OPSWAT for reporting this!

🚨 Active Storage allowed transformation methods that were potentially unsafe

Active Storage attempts to prevent the use of potentially unsafe image transformation methods and parameters by default.

The default allowed list contains three methods allowing for the circumvention of the safe defaults which enables potential command injection vulnerabilities in cases where arbitrary user supplied input is accepted as valid transformation methods or parameters.

This has been assigned the CVE identifier CVE-2025-24293.

Versions Affected: >= 5.2.0
Not affected: < 5.2.0
Fixed Versions: 7.1.5.2, 7.2.2.2, 8.0.2.1

Impact

This vulnerability impacts applications that use Active Storage with the image_processing processing gem in addition to mini_magick as the image processor.

Vulnerable code will look something similar to this:

<%= image_tag blob.variant(params[:t] => params[:v]) %>

Where the transformation method or its arguments are untrusted arbitrary input.

All users running an affected release should either upgrade or use one of the workarounds immediately.

Releases

The fixed releases are available at the normal locations.

Workarounds

Consuming user supplied input for image transformation methods or their parameters is unsupported behavior and should be considered dangerous.

Strict validation of user supplied methods and parameters should be performed as well as having a strong ImageMagick security policy deployed.

Credits

Thank you lio346 from Unit 515 of OPSWAT for reporting this!

Release Notes

8.0.1 (from changelog)

More info than we can show here.

8.0.0.1 (from changelog)

More info than we can show here.

8.0.0 (from changelog)

More info than we can show here.

7.2.2.1 (from changelog)

More info than we can show here.

7.2.2 (from changelog)

More info than we can show here.

7.2.1.2 (from changelog)

More info than we can show here.

7.2.1.1 (from changelog)

More info than we can show here.

7.2.1 (from changelog)

More info than we can show here.

7.2.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ activesupport (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

Release Notes

8.0.1 (from changelog)

More info than we can show here.

8.0.0.1 (from changelog)

More info than we can show here.

8.0.0 (from changelog)

More info than we can show here.

7.2.2.1 (from changelog)

More info than we can show here.

7.2.2 (from changelog)

More info than we can show here.

7.2.1.2 (from changelog)

More info than we can show here.

7.2.1.1 (from changelog)

More info than we can show here.

7.2.1 (from changelog)

More info than we can show here.

7.2.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ connection_pool (indirect, 2.5.4 β†’ 3.0.2) Β· Repo Β· Changelog

Release Notes

3.0.2 (from changelog)

More info than we can show here.

3.0.1 (from changelog)

More info than we can show here.

3.0.0 (from changelog)

More info than we can show here.

2.5.5 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ date (indirect, 3.5.0 β†’ 3.5.1) Β· Repo

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ erb (indirect, 4.0.4 β†’ 6.0.0) Β· Repo Β· Changelog

Release Notes

6.0.0

More info than we can show here.

5.1.3

More info than we can show here.

5.1.2

More info than we can show here.

5.1.1 (from changelog)

More info than we can show here.

5.1.0 (from changelog)

More info than we can show here.

5.0.3 (from changelog)

More info than we can show here.

5.0.2 (from changelog)

More info than we can show here.

5.0.1 (from changelog)

More info than we can show here.

5.0.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ psych (indirect, 5.2.6 β†’ 5.3.0) Β· Repo Β· Changelog

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ railties (indirect, 7.1.6 β†’ 8.0.2.1) Β· Repo Β· Changelog

Release Notes

8.0.1 (from changelog)

More info than we can show here.

8.0.0.1 (from changelog)

More info than we can show here.

8.0.0 (from changelog)

More info than we can show here.

7.2.2.1 (from changelog)

More info than we can show here.

7.2.2 (from changelog)

More info than we can show here.

7.2.1.2 (from changelog)

More info than we can show here.

7.2.1.1 (from changelog)

More info than we can show here.

7.2.1 (from changelog)

More info than we can show here.

7.2.0 (from changelog)

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ rdoc (indirect, 6.15.1 β†’ 6.17.0) Β· Repo Β· Changelog

Release Notes

6.17.0

More info than we can show here.

6.16.1

More info than we can show here.

6.16.0

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ stringio (indirect, 3.1.8 β†’ 3.1.9) Β· Repo Β· Changelog

Release Notes

3.1.9

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ timeout (indirect, 0.4.4 β†’ 0.5.0) Β· Repo

Release Notes

0.5.0

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

πŸ†• uri (added, 1.1.1)

πŸ†• useragent (added, 0.16.11)

πŸ—‘οΈ cgi (removed)

πŸ—‘οΈ mutex_m (removed)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label Aug 14, 2025
@depfu depfu bot force-pushed the depfu/update/group/rails-8.0.2.1 branch from 615e103 to 9cbb15f Compare October 7, 2025 18:43
@mayorova mayorova force-pushed the depfu/update/group/rails-8.0.2.1 branch from b3589df to 53c5665 Compare November 5, 2025 15:19
@mayorova mayorova marked this pull request as draft November 5, 2025 15:23
@depfu depfu bot force-pushed the depfu/update/group/rails-8.0.2.1 branch from 53c5665 to 1f70b27 Compare November 12, 2025 18:30
@depfu depfu bot force-pushed the depfu/update/group/rails-8.0.2.1 branch from 1f70b27 to b58c09a Compare December 10, 2025 10:10
@depfu depfu bot changed the title 🚨 [security] Update rails 7.0.8.7 β†’ 8.0.2.1 (major) 🚨 [security] Update rails 7.1.6 β†’ 8.0.2.1 (major) Dec 10, 2025
@depfu depfu bot force-pushed the depfu/update/group/rails-8.0.2.1 branch from b58c09a to 511ad57 Compare December 11, 2025 17:15
@jlledom jlledom self-assigned this Jan 16, 2026
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this file?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need it. It was created automatically by rails app:update

@jlledom jlledom force-pushed the depfu/update/group/rails-8.0.2.1 branch from fcd9cfc to ef7f8d7 Compare January 20, 2026 11:47
* `enum` method definition changed in rails
* Send relation directly to `select_all`
* Set `:test` as queue adapter for tests
*
* Add `mutex_m` to the Gemfile
* Add `csv` to the Gemfile
@jlledom jlledom force-pushed the depfu/update/group/rails-8.0.2.1 branch from ef7f8d7 to e89c22d Compare January 21, 2026 08:41
@jlledom
Copy link
Contributor

jlledom commented Jan 21, 2026

Jira issue for this upgrade: https://issues.redhat.com/browse/THREESCALE-12186

I followed the migration guides for 7.2 and 8.0 and went through the whole list of deprecations for both updates. This is what I did:

I also tested locally, Both normal and TLS DB:

  • Add app
  • Edit app secret
  • Remove app
  • Add domain
    • Couldn't test it because I dont know how to test it

I comment further details in each file. About the rails defaults, I think we should set config.load_defaults to 8.0. But I'm leaving the defaults initializers for now so we can discuss the values. My intention is to remove them before merging.

end

gem 'rails', '~> 7.1.6'
gem "mutex_m", "~> 0.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix a deprecation warning:

/home/jlledom/.asdf/installs/ruby/3.3.1/lib/ruby/gems/3.3.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32: warning: /home/jlledom/.asdf/installs/ruby/3.3.1/lib/ruby/3.3.0/mutex_m.rb was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile or gemspec.


gem 'rails', '~> 7.1.6'
gem "mutex_m", "~> 0.3.0"
gem "csv", "~> 3.3"
Copy link
Contributor

Choose a reason for hiding this comment

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

Deprecation warning:

/home/jlledom/.asdf/installs/ruby/3.3.1/lib/ruby/gems/3.3.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32: warning: /home/jlledom/.asdf/installs/ruby/3.3.1/lib/ruby/3.3.0/csv.rb was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add csv to your Gemfile or gemspec. Also contact author of license_finder-7.0.1 to add csv into its gemspec.

has_many :integration_states, dependent: :destroy

enum state: %i[active disabled].index_with{ |status| status.to_s }
enum :state, %i[active disabled].index_with{ |status| status.to_s }
Copy link
Contributor

Choose a reason for hiding this comment

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

Changed in rails: rails/rails@439298e

Comment on lines +50 to +51
# Append comments with runtime information tags to SQL queries in logs.
config.active_record.query_log_tags_enabled = true
Copy link
Contributor

Choose a reason for hiding this comment

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

This was added by app:update

Comment on lines +49 to +50
# Prevent health checks from clogging up the logs.
config.silence_healthcheck_path = "/up"
Copy link
Contributor

Choose a reason for hiding this comment

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

Added by the update task. Any idea which is our health check path?

Comment on lines +68 to +69
# Only use :id for inspections in production.
config.active_record.attributes_for_inspect = [ :id ]
Copy link
Contributor

Choose a reason for hiding this comment

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

Added by app:update. It doesn't harm I guess.

# Raise error when a before_action's only/except options reference missing actions.
config.action_controller.raise_on_missing_callback_actions = true

config.active_job.queue_adapter = :test
Copy link
Contributor

Choose a reason for hiding this comment

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

# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [
:password, :access_token
:password, :access_token, :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc
Copy link
Contributor

Choose a reason for hiding this comment

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

Added by the update task, I think it's fine.

# backends that use the same database as Active Record as a queue, hence they
# don't need this feature.
#++
# Rails.application.config.active_job.enqueue_after_transaction_commit = :default
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is pretty confusing: enqueue_after_transaction_commit. It tries to fix the scenario when job is enqueued inside a transaction but the transaction was rollbacked. In that scenario the job would actually run and lead to undefined behavior. It's confusing because Rails maintainers changed opinion about this several times:

  1. 7.2: Added, and took 3 values: :always. :never and :default.
  2. 8.0: Deprecated, and took 2 values: true and false
  3. 8.1: Removed
  4. 8.2: Added again, taking boolean values, and true by default.

8.2 Changelog: https://github.com/rails/rails/blob/6f39910d26eb590cb214a0fce5858fe0d7ddfff8/activejob/CHANGELOG.md?plain=1#L48-L58

The setting only makes sense when the queue is not stored in the same DB ActiveRecord uses. For instance the Sidekiq scenario using Redis. But Que stores the queue in the same DB as ActiveRecord so the changes in the queue are committed or rollbacked along with other changes in the transaction.

I think this doesn't affect us, so leaving it unset.

# This is possible due to broad browser support for WebP, but older browsers and email clients may still not support
# WebP. Requires imagemagick/libvips built with WebP support.
#++
# Rails.application.config.active_storage.web_image_content_types = %w[image/png image/jpeg image/gif image/webp]
Copy link
Contributor

Choose a reason for hiding this comment

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

Not relevant, we don't have assets in Zync, right?

# Applications with existing timestamped migrations that do not adhere to the
# expected format can disable validation by setting this config to `false`.
#++
Rails.application.config.active_record.validate_migration_timestamps = true
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't seem we'll face the scenario this tries to protect from, right?

#
# This query used to return a `String`.
#++
Rails.application.config.active_record.postgresql_adapter_decode_dates = true
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't use the affected syntax in our codebase AFAIK

# Enables YJIT as of Ruby 3.3, to bring sizeable performance improvements. If you are
# deploying to a memory constrained environment you may want to set this to `false`.
#++
Rails.application.config.yjit = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Apparently this will get us 15-20% performance boost if enabled, it requires Ruby 3.3 which we use.

# If set to `:offset`, `to_time` methods will use the UTC offset.
# If `false`, `to_time` methods will convert to the local system UTC offset instead.
#++
Rails.application.config.active_support.to_time_preserves_timezone = :zone
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't affect us I think. Anyway, we still see the deprecation warning about this because the warning is shown before this initializer runs. So the proper way to set this value would be setting load_defaults to 8.0.

# only consider `If-None-Match` as specified by RFC 7232 Section 6.
# If set to `false` both conditions need to be satisfied.
#++
Rails.application.config.action_dispatch.strict_freshness = true
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we return 304 from zync, right? This should have any effect. Anyway, if the setting forces following an RFC, then it's good I think.

###
# Set `Regexp.timeout` to `1`s by default to improve security over Regexp Denial-of-Service attacks.
#++
Regexp.timeout = 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Not Rails class, but I agree on setting this.


execute do |connection|
connection.select_all(relation.to_sql)
connection.select_all(relation)
Copy link
Contributor

Choose a reason for hiding this comment

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

For some reason, to_sql doesn't bind values in Rails 8, which generates SQL conditions like error_count = $1. This fixes it.

Comment on lines +15 to +18
def with_que_adapter(&block)
ApplicationJob.stub(:queue_adapter, ActiveJob::QueueAdapters::QueAdapter.new, &block)
end

Copy link
Contributor

Choose a reason for hiding this comment

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

All tests run now using the default :test queue adapter I set in the environments/test.rb file. However, this particular test suite actually requires using the Que adapter, Claude suggested this.

class ModelTest < ActiveSupport::TestCase
self.use_transactional_tests = false

def test_weak_lock
Copy link
Contributor

Choose a reason for hiding this comment

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

The original idea for this test was simulating a race condition and ensure the corresponding exception is raised. But this test had a few problems:

  1. Instead of simulating different threads belonging to different requests, it used Fibers within a single thread.
  2. It was using a stub that didn't work because the stub was set only when the fiber was created, but remove just before the fiber starts to run.
  3. The test tries to simulate an unfinished transaction, but the whole test itself ran inside a parent transaction.
  4. It relied on stubbing some rails internals, but those internals changed in Deprecate ConnectionPool#connectionΒ rails/rails#51230

I rewrote it in a way it more closely reproduces reality.

@jlledom jlledom marked this pull request as ready for review January 21, 2026 09:42
@mayorova
Copy link
Contributor

Before even reviewing the PR, @jlledom, a question - is it actually safe to jump straight from 7.1 to 8.0 ?
Shouldn't we pass through 7.2 first? πŸ€”

@jlledom
Copy link
Contributor

jlledom commented Jan 21, 2026

Before even reviewing the PR, @jlledom, a question - is it actually safe to jump straight from 7.1 to 8.0 ? Shouldn't we pass through 7.2 first? πŸ€”

Maybe I should have questioned that also before starting to work on it. But Depfu did the skip and I took it without question. I don't know, everything seems to work for me, zync is a small project and we have QE. WDYT?

@mayorova
Copy link
Contributor

Maybe I should have questioned that also before starting to work on it. But Depfu did the skip and I took it without question. I don't know, everything seems to work for me, zync is a small project and we have QE. WDYT?

I also kind of forgot that there was a 7.2 in-between πŸ™ƒ

But I think it would make sense to first upgrade to 7.2, and then to 8.0. It's probably OK to do it within the same product release. But for the sake of sanity, we probably should split them in 2 PRs? πŸ€”

Unless @akostadinov has a different opinion.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants