-
Notifications
You must be signed in to change notification settings - Fork 19
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
[DO NOT MERGE] APPEALS-28921 - Explore update to Rails 7.0 #23592
Draft
jcroteau
wants to merge
27
commits into
main
Choose a base branch
from
jcroteau/APPEALS-28921-explore-update-to-rails-7-0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[DO NOT MERGE] APPEALS-28921 - Explore update to Rails 7.0 #23592
jcroteau
wants to merge
27
commits into
main
from
jcroteau/APPEALS-28921-explore-update-to-rails-7-0
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code Climate has analyzed commit 9f2992e and detected 0 issues on this pull request. View more on Code Climate. |
jcroteau
force-pushed
the
jcroteau/APPEALS-28921-explore-update-to-rails-7-0
branch
from
November 21, 2024 17:20
91a0a39
to
331fcdb
Compare
We're not using the `button_to` view helper anywhere currently, so it is safe to assume the default setting.
…ault` We currently use `stylesheet_link_tag` in a couple templates without passing the `media` option, so lets preserve the preexisting behavior of this helper for now to stay on the safe side.
…st_class` Preserve preexisting digest class for key generators.
Preserve preexisting digest class for ActiveSupport::Digest.
…with_zone_name` Preserve existing behavior of `ActiveSupport::TimeWithZone.name`. This will trigger a deprecation warning, but we can kick the can down the road and resolve this before the upgrade to Rails 7.1.
We're not using ActiveStorage, so it is safe to assume the default for this setting.
Custom scopes on the opposite association prevent automatic identification, as do custom scopes on an association itself unless `config.active_record.automatic_scope_inversing` is set to `true`. Out of an abundance of caution, let's preserve the existing behavior for now. We can revisit this setting once the Rails upgrade is complete with a passing test suite.
…fixtures` Out of an abundance of caution, let's preserve the existing behavior for now. We can revisit this setting once the Rails upgrade is complete with a passing test suite.
Out of an abundance of caution, let's preserve the existing behavior for now. We can revisit this setting once the Rails upgrade is complete with a passing test suite.
…cts` Preserve existing behavior by allowing open redirects. At some point, we should hunt down open redirects (if there are any) and make sure we're validating the other hosts before making this setting `true`.
We're not using ActiveStorage, so it's safe to assume the default here.
…efault` This setting replaces the configuration in `config/initializers/wrap_parameters.rb`. Override the default to preserve the pre-existing behavior.
…ids` We're not using methods `Digest::UUID.uuid_v3` or `Digest::UUID.uuid_v5`, so it should be safe to assume the default here.
Preserve existing headers, including the deprecated `X-XSS-Protection` header, until we can put an appropriate Content Security Policy (CSP) in place. For further details, see: - rails/rails#41769 - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection - https://scotthelme.co.uk/security-headers-updates/#removing-the-x-xss-protection-header - https://stackoverflow.com/questions/9090577/what-is-the-http-header-x-xss-protection#answer-57802070 - https://guides.rubyonrails.org/security.html#content-security-policy-header
Rails 7 introduces a more optimized serialization format for caching. The old cache entry format under Rails 6.1 will be forward compatible with Rails 7, however, the new format under Rails 7 will not be backward compatible with Rails 6.1. Therefore, we should wait until the app is stable on Rails 7.0 and there is no possibility of a rollback before we can remove this override / assume the new default.
On Rails 7, the default for `config.action_dispatch.cookies_serializer` is :json, so we can remove `config/initializers/cookies_serializer.rb` as that configuration is now redundant.
…dia_type_on_content_type` Preserve preexisting behavior of `ActionDispatch::Request#content_type`. Once the test suite is passing on Rails 7, we can consider the default behavior and make adjustments where necessary.
…de_hidden` We're not currently using ActiveStorage, so it's safe to assume the default here.
Now that all necessary default overrides are in place, we can bump `config.load_defaults` for Rails 7.
The `rails` gem doesn't depend on `sprockets-rails` anymore. Since we still use Sprockets, we must now add it explicitly. See https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#sprockets-is-now-an-optional-dependency
jcroteau
force-pushed
the
jcroteau/APPEALS-28921-explore-update-to-rails-7-0
branch
from
November 22, 2024 17:41
331fcdb
to
c17eed9
Compare
After dumping the database schemas in Rails 7, there are a few differences: - `ActiveRecord::Schema` is now versioned: `ActiveRecord::Schema[7.0]` - `t.datetime` calls with option `precision: 6` will have the `precision` option removed, as 6 is now the default. - `t.datetime` calls without a `precision` option specified will be given `precision: nil` (fallback to the database default) As a precaution, DDLs were generated for both the `primary` and `etl` databases before and after this change and were checked for differences. They were found to be identical, so this change is purely cosmetic and just brings the schema files into alignment with the new Rails 7 conventions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to