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.0 compatibility #225
Conversation
I have configured CircleCI to allow forked PRs to run. And I’ve released Phenix v0.6.0. If you push this branch again, I think (hope) the build is going to run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, good job – thank you!
A bit more context: The relevant changes in ActiveRecord
are
- Part 2: Multi-db improvements, Refactor Active Record configurations rails/rails#33637 – changed
AR::Base.configuration
to not return a Hash. - Move SchemaMigration to migration_context rails/rails#36439 – changed
SchemaMigration
andMigrator
initializers.
@@ -117,15 +117,15 @@ | |||
|
|||
describe "#shard_status" do | |||
it "shows nothing if everything is ok" do | |||
ActiveRecord::Migrator.shard_status([1]).must_equal([{}, {}]) | |||
_(ActiveRecord::Migrator.shard_status([1])).must_equal([{}, {}]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain this change in words, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minitest 6 introduced some deprecations: https://github.com/seattlerb/minitest/blob/96ba1dac6141599cce47ec298e7e72dc7d49812d/lib/minitest/spec.rb#L13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI require 'maxitest/global_must'
will silence this too, but converting is fine too 👍
@zhuravel Did you look into the new connection switching API in ActiveRecord v6.0? rails/rails#34052 and rails/rails#35073 I must admit that I haven’t yet looked at it in details, but I imagined that it might be used to simplify how this gem works. I am actually surprised to see that it apparently still works without using the new connection API. |
@bquorning I did not look into how the new connection switching API can be used to simplify the gem. My goal was to upgrade our project to Rails 6 and this PR is mostly for people whose Rails 6 upgrade is also blocked by |
Could you please also lock to `"phenix", ">= 0.6.0" in the gemspec? |
Never mind – I’ll merge this PR first, then fix up a few things before releasing the new version. Thanks for the contribution – and your patience with me 😄 |
@zhuravel I have just released v3.16.0 which includes these changes. Thank you again. |
Tests pass with the updated
phenix
code from zendesk/phenix#10.