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

Upgrade to Rails 6.1 and Ruby 3.0.2 #870

Merged
merged 9 commits into from Feb 13, 2022
Merged

Upgrade to Rails 6.1 and Ruby 3.0.2 #870

merged 9 commits into from Feb 13, 2022

Conversation

manno
Copy link
Member

@manno manno commented Oct 20, 2021

I don't have time to pursue this at the moment.

  • Prawn
  • Tests and CSS matchers
  • Static program export (templates)
  • ...?

@elad-eyal
Copy link
Collaborator

elad-eyal commented Nov 15, 2021

@manno the sqlite CI failure can be removed by changing =9 to =4 in .github/workflows/ci.yaml line 83.

The idea of that part of the test is - we check we can rollback a few DB migrations, then migrate, and we want to verify that the identical schema was reached (db/schema.rb is created with sqlite)

It seems something changed - the offending migrations did not change, and they had foreign_key: true but now the add this to the schema file

add_foreign_key "average_review_scores", "events"
add_foreign_key "average_review_scores", "review_metrics"
add_foreign_key "review_metrics", "conferences"
add_foreign_key "review_scores", "event_ratings"
add_foreign_key "review_scores", "review_metrics"

So I'm not 100% if this reveals a real problem; but anyway it's a specific test for validating migrations, and those surely did not become any worse. changing =9 to =4 just means the automated test will roll back 4 migrations and re-migrate instead of 9.

@manno manno force-pushed the rails6 branch 4 times, most recently from cc1f658 to bead189 Compare December 5, 2021 12:57
@manno manno force-pushed the rails6 branch 3 times, most recently from cd503df to 522a7ea Compare December 18, 2021 21:25
* capybara spec changes
Fixed:

> Disable compile cache if Ruby 3.0.3's ISeq cache bug is detected. AKA iseq.rb:13 to_binary: wrong argument type false (expected Symbol)
Previously we assumed that `db/schema.rb` is database agnostic.
This is not exactly true in all regards.

* rails/rails#26209 (comment)

Our commited `schema.rb` can be used to `db:setup` all databases.
running `db:schema:dump` or `db:migrate`, will turn the file into a
database specific one.
Formerly that wasn't obvious with the sqlite adapter, but now it dumps
foreign key information into the schema.
The previous check cannot be used anymore.

This is unfortunate, since frab's migrations are so old, that you cannot
`db:create db:migrate` a fresh system.

Not sure if related, but we will probably see more problems with old
frab installations on MySQL, due to the 2016 bigint change. These become
especially problematic, when using foreign key constraints:

* (MySQL switched to bigint)[rails/rails#26266]
* rails/rails#43168

Changing all IDs and references to bigint on MySQL is probably not
possible from migrations and should be done by the admin. A more
extensive solution than this is needed:
#660 (comment)
* this drops database_cleaner, the default transactional tests work fine
* don't fail-fast the github actions matrix, so we now if it's a
  database related failure
* frab test event title doesn't contain database id, multiply by 3 to
  avoid flakes in filter tests
* editing_event_people_test waits for hidden field to change
* turn on parallelized tests, one can set PARALLEL_WORKERS for more
  workers
@manno manno marked this pull request as ready for review December 21, 2021 00:23
The quotes are needed, because YAML parses the value to a number.
This turns the 3.0 into a 3, which leads to the installation of Ruby
3.1.
Howver gems (github-markdown?) are not ready for 3.1
@manno manno merged commit 55b01b4 into main Feb 13, 2022
@manno manno deleted the rails6 branch February 13, 2022 20:11
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.

None yet

2 participants