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

Bump rails from 7.1.3.4 to 7.2.0 #9692

Merged
merged 13 commits into from
Sep 17, 2024
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 15, 2024

Bumps rails from 7.1.3.4 to 7.2.0.

Release notes

Sourced from rails's releases.

7.2.0

Active Support

  • Fix delegate_missing_to allow_nil: true when called with implict self

    class Person
      delegate_missing_to :address, allow_nil: true
    def address
    nil
    end
    def berliner?
    city == "Berlin"
    end
    end
    Person.new.city # => nil
    Person.new.berliner? # undefined local variable or method `city' for an instance of Person (NameError)

    Jean Boussier

  • Add logger as a dependency since it is a bundled gem candidate for Ruby 3.5

    Earlopain

  • Define Digest::UUID.nil_uuid, which returns the so-called nil UUID.

    Xavier Noria

  • Support duration type in ActiveSupport::XmlMini.

    heka1024

  • Remove deprecated ActiveSupport::Notifications::Event#children and ActiveSupport::Notifications::Event#parent_of?.

    Rafael Mendonça França

  • Remove deprecated support to call the following methods without passing a deprecator:

    • deprecate
    • deprecate_constant
    • ActiveSupport::Deprecation::DeprecatedObjectProxy.new
    • ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new
    • ActiveSupport::Deprecation::DeprecatedConstantProxy.new
    • assert_deprecated
    • assert_not_deprecated

... (truncated)

Commits
  • fb6c430 Preparing for 7.2.0 release
  • c9a5cfd Merge pull request #52540 from mattbrictson/fix-brakeman-ci-desc
  • ac2035a Merge pull request #52555 from rails/rm-fix-system-test
  • 7ae1ec1 Remove WEB_CONCURRENCY "auto" from tuning_performance_for_deployment (#52545)
  • 0461267 Merge pull request #52554 from erados/patch-1
  • c2e0f6f Remove redundant Puma configuration settings from fresh config/puma.rb files
  • ecf787c Puma 5+ now pulls WEB_CONCURRENCY directly from ENV, so we cannot/should not ...
  • 573d4bd Merge pull request #52533 from denys-chaikovskyi/mod/auto-puma-workers
  • 0b3404e Merge pull request #52531 from n-studio/allow-bots
  • 6ffa94c Merge pull request #52524 from rubys/rm-redundant-comment
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file Ruby Pull requests that update Ruby code labels Aug 15, 2024
@tomas-stefano tomas-stefano force-pushed the dependabot/bundler/rails-7.2.0 branch from a9f3226 to a1305bb Compare August 15, 2024 12:58
@avinhurry avinhurry self-assigned this Aug 15, 2024
avinhurry added a commit to DFE-Digital/dfe-analytics that referenced this pull request Aug 15, 2024
When upgrading our apps to rails version 7.2:

Publish: DFE-Digital/publish-teacher-training#4445

Apply: DFE-Digital/apply-for-teacher-training#9692

Register: DFE-Digital/register-trainee-teachers#4562

We are getting the following error:

NoMethodError: undefined method `migration_context' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x0000000000c620

raise ActiveRecord::PendingMigrationError if ActiveRecord::Base.connection.migration_context.needs_migration?

This is because of breaking changes and deprecation in rails 7.2:

ActiveRecord::Base.connection was changed to with_connection:

- https://blog.saeloun.com/2024/07/01/rails-adds-activerecord-base-with-connection/

This deprecation meant that rspec had to be upgraded:
- rspec/rspec-rails#2661

Set functional versions of the rspec-rails and rails gems depending on what version of rails you are using.
@dcyoung-dev
Copy link
Collaborator

This may be a handy article https://www.fastruby.io/blog/upgrade-rails-7-1-to-7-2.html

Copy link
Collaborator

@avinhurry avinhurry left a comment

Choose a reason for hiding this comment

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

I'm looking into this.

The current issue lies with the DfE analytics gem. I've opened a PR to help with a fix: DFE-Digital/dfe-analytics#162

Copy link
Contributor Author

dependabot bot commented on behalf of github Aug 23, 2024

A newer version of rails exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

@avinhurry avinhurry force-pushed the dependabot/bundler/rails-7.2.0 branch from a1305bb to a13a067 Compare September 4, 2024 18:10
@avinhurry avinhurry marked this pull request as draft September 4, 2024 18:11
@avinhurry avinhurry force-pushed the dependabot/bundler/rails-7.2.0 branch from 183dcdb to 5528022 Compare September 11, 2024 10:42
@avinhurry avinhurry force-pushed the dependabot/bundler/rails-7.2.0 branch from 5528022 to 9161a70 Compare September 11, 2024 11:22
@avinhurry
Copy link
Collaborator

Upgrade to rails 7.2

@avinhurry avinhurry force-pushed the dependabot/bundler/rails-7.2.0 branch from 7d4992f to af779c2 Compare September 11, 2024 14:50
@avinhurry avinhurry force-pushed the dependabot/bundler/rails-7.2.0 branch from af779c2 to 8a44582 Compare September 11, 2024 14:54
@avinhurry avinhurry force-pushed the dependabot/bundler/rails-7.2.0 branch from 8a44582 to 50eb411 Compare September 11, 2024 15:48
@avinhurry avinhurry marked this pull request as ready for review September 11, 2024 15:50
@avinhurry avinhurry force-pushed the dependabot/bundler/rails-7.2.0 branch from 7ed1828 to dff04bd Compare September 12, 2024 17:31
@avinhurry avinhurry force-pushed the dependabot/bundler/rails-7.2.0 branch from 180bdad to 2fef633 Compare September 12, 2024 18:34
@avinhurry avinhurry force-pushed the dependabot/bundler/rails-7.2.0 branch from 2fef633 to e728bf6 Compare September 12, 2024 18:42
@avinhurry avinhurry force-pushed the dependabot/bundler/rails-7.2.0 branch from e728bf6 to dff04bd Compare September 12, 2024 18:50
@github-actions github-actions bot temporarily deployed to review_aks-9692 September 13, 2024 09:14 Destroyed
@github-actions github-actions bot temporarily deployed to review_aks-9692 September 16, 2024 09:04 Destroyed
@avinhurry avinhurry marked this pull request as ready for review September 16, 2024 09:16
@avinhurry avinhurry requested a review from a team September 16, 2024 09:16
Copy link
Contributor

@elceebee elceebee left a comment

Choose a reason for hiding this comment

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

Nice work!

Copy link
Collaborator

@dcyoung-dev dcyoung-dev left a comment

Choose a reason for hiding this comment

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

All looks good. I'm not sure about the impact of the config.active_record.postgresql_adapter_decode_dates = false does this change anything in our Application? I assume this is true by default in Rails 7.2

config/environments/development.rb Show resolved Hide resolved
@avinhurry avinhurry merged commit 5452685 into main Sep 17, 2024
69 of 70 checks passed
@avinhurry avinhurry deleted the dependabot/bundler/rails-7.2.0 branch September 17, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file deploy_v2 Deploy the review app to AKS Ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants