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 7.1 #2431

Merged
merged 21 commits into from
Nov 27, 2023
Merged

Rails 7.1 #2431

merged 21 commits into from
Nov 27, 2023

Conversation

jrochkind
Copy link
Contributor

Passing and working on Rails 7.1, but still with deprecation warnings and other config that needs to be updated.

We'll leave this in draft until that is done in a separate PR, but doing in a separate PR for ease of review.

  • Rails 7.1 requires explicit require of active_job/log_subscriber for some reason
  • Rails 7.1, plus updates to blacklight, qa, and browse_everything necessary for Rails 7.1
  • move restricted derivatives to factory and stop using #dup on ActiveRecord
  • fix param check for Rails 7.1 where inner hash is also an ActionController::Parameters instead of Hash
  • more comments on rack 2.x lock

…ecord

In Rails 7.1 it was creating problems with dup'ing the friendlier_id, I think because Rails 7.1 is better at actually retrieving the database-set friendlier_id

This was a messy way to do it anyway, dup'ing ActiveRecord objects is kind of asking for trouble. Factories are the right way to DRY a model in a particular state for test, that's what they're for.
@jrochkind
Copy link
Contributor Author

Weird

Your bundle only supports platforms ["arm64-darwin-21"] but your local platform
is x86_64-linux. Add the current platform to the lockfile with
bundle lock --add-platform x86_64-linux and try again.

Why have we not encountered that before? But I will do what it says.

Not sure why it only just now started complaining asking us to do this?  We got an error when running on linux, which told us to:

bundle lock --add-platform x86_64-linux

So we did so
@jrochkind
Copy link
Contributor Author

Deployed to staging, basic sanity check that it deploys and displays, didn't QA every feature or anything

@jrochkind
Copy link
Contributor Author

@eddierubeiz I don't want to merge this until I have more things done on Rails 7.1 -- getting rid of deprecations and such -- but this ready for your approval now!

@eddierubeiz
Copy link
Contributor

Done. Thanks for refactoring the test code into the factory too.

With 'bundle update rails'
…ure why yet

It was an oversight we were still on 6.1 and not 7.0 when we moved to Rails 7.0
That's all we were using secrets.yml from, we can just set the config from ENV directly, since we aren't putting key in source anyway. In fact, Rails would just pick it up from SECRET_KEY_BASE env even without this, by default? But for consistency with what we did before and clarity, we're going to move it over like this.
…ally take effect

In config/initializers, it was happening too late to actually affect our Asset class, so we didn't actually see the new behavior that ended up cauisng us problems
…er_commits to run early enough that we can still work in presence of Rails 7.1 run_after_transaction_callbacks_in_order_defined
jrochkind and others added 3 commits November 22, 2023 10:31
Previously on CI, somehow our DB schema _was_ getting loaded... but after moving to Rails 7.1 it wasn't and was causing an error. Not sure what was going on before, but in CI setup script changing 'db:create' to 'db:prepare` tells rails to create the DB _and_ load the schema, and fixes our build
…recation

Rails 7.1 config and deprecation -- step 1
@jrochkind jrochkind marked this pull request as ready for review November 27, 2023 15:27
@jrochkind jrochkind merged commit 3afd9c5 into master Nov 27, 2023
1 check passed
@jrochkind jrochkind deleted the rails_7.1 branch November 27, 2023 15:31
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.

2 participants