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

config file updates for rails 7 upgrade #1152

Merged
merged 2 commits into from
Dec 30, 2024
Merged

Conversation

PhilipDeFraties
Copy link
Collaborator

@PhilipDeFraties PhilipDeFraties commented Dec 28, 2024

JIRA issue link

https://agile6.atlassian.net/browse/DM-5358

Description - what does this code do?

Numerous updates to various config files via app:update command.

I went through and reviewed each file updated line by line, reverting changes that needed to be kept (ie keeping the settings for redis caching in the environment config files). Many changes were just adding/updating commented instructions and examples in the config files or replacing single quotes with double.

One notable change was the adding of default precision values for timestamp columns on in the schema, which unfortunately also removed the existing precision settings that needed to be subsequently added back via migration in the second commit. Note: the va_facilities and visns tables' timestamp columns were previously set to a precision of 11 which is (and was) outside the supported range of 0-6 so I reimplemented at the max of 6.

Testing done - how did you test it/steps on how can another person can test it

CI + manual testing on DEV

Screenshots, Gifs, Videos from application (if applicable)

Link to mock-ups/mock ups (image file if you have it) (if applicable)

Acceptance criteria

  • [ ]

Definition of done

  • Unit tests written (if applicable)
  • e2e/accessibility tests written (if applicable)
  • Events are logged appropriately
  • Documentation has been updated, if applicable
  • A link has been provided to the originating JIRA issue
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs

@PhilipDeFraties PhilipDeFraties changed the title Upgrade spring gem in preparation for Rails 7 config file updates for rails 7 upgrade Dec 28, 2024
@PhilipDeFraties PhilipDeFraties force-pushed the rails-7-app-update branch 2 times, most recently from 1ff6711 to 0ade33d Compare December 30, 2024 21:32
- Updated configuration files to align with Rails 7 defaults, many are just updating commented examples/instructions or replacing single quotes with double.
- Updated Redis caching configuration in development and test environments.
- remove sidekiq as queue adapted in env configs
- Applied updates to logging, caching, and middleware configurations for improved performance and maintainability.
- Updated schema.rb to reflect changes introduced by Rails 7, previously set precision values removed will be added back via migration in next commit
precision values were removed via app:update command as per rails 7 update

va_facilities and visns tables previously had precision set to 11 which is outside the supported range of 0-6, so reimplementing with the max of 6
@PhilipDeFraties PhilipDeFraties self-assigned this Dec 30, 2024
@PhilipDeFraties PhilipDeFraties marked this pull request as ready for review December 30, 2024 22:23
@PhilipDeFraties PhilipDeFraties merged commit 969f26d into rails-7 Dec 30, 2024
1 check failed
@PhilipDeFraties PhilipDeFraties deleted the rails-7-app-update branch December 30, 2024 23:05
PhilipDeFraties added a commit that referenced this pull request Jan 8, 2025
* Upgrade spring gem in preparation for Rails 7

* Disable config.cache_classes to satisfy Spring error

* Enable reloading for tests

* stringify values for ActiveAdmin authorization_adapter in in initializers

* update rails gem to 7.0

* update commontator gem to 7.0.1

* Replace deprecated Time#to_s(:db)

* boot.rb

* Add sprockets-rails gem (#1149)

* revert commontator gem version bump

* update syntax for preloader object initialization in Thread#nested_comments_for

* revert changes to class caching and reloading in test.rb file

* update github actions ci config file to disable spring when running rspec

* config file updates for rails 7 upgrade (#1152)

* Apply changes from Rails 7 app:update

- Updated configuration files to align with Rails 7 defaults, many are just updating commented examples/instructions or replacing single quotes with double.
- Updated Redis caching configuration in development and test environments.
- remove sidekiq as queue adapted in env configs
- Applied updates to logging, caching, and middleware configurations for improved performance and maintainability.
- Updated schema.rb to reflect changes introduced by Rails 7, previously set precision values removed will be added back via migration in next commit

* Reapply timestamp precision values

precision values were removed via app:update command as per rails 7 update

va_facilities and visns tables previously had precision set to 11 which is outside the supported range of 0-6, so reimplementing with the max of 6

* dm-5377 update rails config defaults 6.1 -> 7 (#1153)

* enable rails 7 button_to config update

* enable rails 7 config apply_stylesheet_media_default setting

* add cookie_rotator initializer as per rails 7 upgrade guide:

https://guides.rubyonrails.org/v7.0/upgrading_ruby_on_rails.html#key-generator-digest-class-changing-to-use-sha256

* update active_support.key_generator_hash_digest_class to enable SHA256 encryption

* update active_support.hash_digest_class to enable SHA256 encryption

* update active_support.remove_deprecated_time_with_zone_name config to true

* enable active_support.executor_around_test_case in default configs file

* set action_mailer.smtp_timeout in default configs file

* set config.active_storage.video_preview_arguments as per rails 7 defaults

* set config.active_record.automatic_scope_inversing as per rails 7 defaults

* set config.active_record.verify_foreign_keys_for_fixtures as per rails 7 defaults

* set config.active_record.partial_inserts as per rails 7 defaults

* set config.action_controller.raise_on_open_redirects as per rails 7 defaults

* set config.active_storage.variant_processor as per rails 7 defaults

* set config.action_controller.wrap_parameters_by_defaultas per rails 7 defaults

* set config.active_support.use_rfc4122_namespaced_uuids per rails 7 defaults

* set config.action_dispatch.default_headers per rails 7 defaults

* set config.active_support.cache_format_version per rails 7 defaults

* set config.action_dispatch.cookies_serializer per rails 7 defaults

* set config.action_dispatch.return_only_request_media_type_on_content_type per rails 7 defaults

* set config.active_storage.multiple_file_field_include_hidden as per rails 7 defaults

* set config.active_support.disable_to_s_conversion as per rails 7 defaults

* remove temporary config settings and bump config.load_defaults to 7.0

* remove new_framework_defaults_7_0 file

* add bottom blank line

* working commit

* re-add sidekiq as config.active_job.queue_adapter in development and production configs

---------

Co-authored-by: Camille Villa <[email protected]>
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.

1 participant