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

Rails 6.1.4.7 #50511

Merged
merged 21 commits into from May 4, 2023
Merged

Rails 6.1.4.7 #50511

merged 21 commits into from May 4, 2023

Conversation

Hamms
Copy link
Contributor

@Hamms Hamms commented Mar 1, 2023

In addition to the required dependency updates, also apply a few changes to the codebase that can't effectively be applied in advance:

  • Generate a new dashboard/config/storage.yml with rails app:update. We aren't actually using any ActiveStorage functionality anywhere, but Rails 6.1 still expects this configuration file to be present
  • Update schema.rb:
    • Update the null check syntax used by some virtual columns
    • Update create_table invocations to match new expected options format in Rails 6.1
  • Fix violations of new Rubocop rule Rails/CompactBlank
  • Update our no_transform_paths customization to reflect changes to ActionDispatch::FileHandler
  • Update some query count tests to reflect new (lower!) query counts after updating to ActiveRecord 6.1
  • Update FakeDashboard's patching of ActiveRecord::ConnectionAdapters::Mysql2Adapter to reflect changes to its internal structure

Links

Testing story

Largely relying on existing tests to ensure that this change doesn't disrupt any existing functionality. Also read through the major changes in this version (linked above) to confirm that none of them are immediately relevant for our usage.

Follow-up work

After this has been deployed, we can remove this transitional framework configuration and start working on preparing our configuration for Rails 7.0

@Hamms Hamms added the Rails Upgrade All work related to upgrading the version of Ruby on Rails we use. label Mar 14, 2023
@Hamms Hamms marked this pull request as ready for review April 7, 2023 19:42
@Hamms Hamms requested a review from a team as a code owner April 7, 2023 19:42
@Hamms Hamms requested a review from a team April 7, 2023 20:40
@Hamms Hamms requested a review from a team April 18, 2023 19:57
# service: S3
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
# region: us-east-1
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we grab the region dynamically? If the CDO object has been initialized at this point, then we could set it from CDO.aws_region

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We possibly could if we want to, but this is a commented-out section of an auto-generated configuration file which we don't actually use anywhere. It's just a default placeholder which Rails automatically provides for new projects as of v6.0 and which it expects to always be in place as of v6.1, it's not something we need to personalize until we decide to actually start using it.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, my. I need to improve my reading comprehension. 😂
Yup. these placeholders are fine.

Copy link
Member

@davidsbailey davidsbailey left a comment

Choose a reason for hiding this comment

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

LGTM! impressively small diff (if you ignore schema.rb). nice job getting lots of work done ahead in other PRs.

@@ -534,7 +534,7 @@ def embed_level
# Reference links should be stored as an array.
if params[:level][:reference_links].is_a? String
params[:level][:reference_links] = params[:level][:reference_links].split("\r\n")
params[:level][:reference_links].delete_if(&:blank?)
params[:level][:reference_links].compact_blank!
Copy link
Member

Choose a reason for hiding this comment

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

I am just curious, is this being forced by a newly enabled lint rule?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Hamms Hamms merged commit 64db168 into staging May 4, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rails Upgrade All work related to upgrading the version of Ruby on Rails we use.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants