-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
feat!: ActiveRecord 7.2 support #397
Conversation
4cb4959
to
b1485ec
Compare
@keithdoggett : The errors are flacky and happen when the adapter is not connected yet in CI. |
@@ -5,22 +5,25 @@ | |||
module PostGIS | |||
class SchemaStatementsTest < ActiveSupport::TestCase | |||
def test_initialize_type_map | |||
initialized_types = SpatialModel.connection.send(:type_map).keys | |||
SpatialModel.with_connection do |connection| | |||
assert connection.connected? |
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.
This is flacky.
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.
Probably due to how the adapter is registered now?
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.
No, it just flacky in CI.
I will focus on the cause later.
If you rerun the failed builds, they will become green.
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.
Was it flaky before this PR?
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.
Yes, in CI.
@seuros thank you for submitting this I'll review this in the morning. Thanks for all the help. |
@seuros thank you for your continued effort. I and @theonlyriddle will be unable to work on the project that we need this for, for some time. We appreciate your effort very much! |
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.
@seuros looks good. Just a few questions here. Thanks again
@@ -5,22 +5,25 @@ | |||
module PostGIS | |||
class SchemaStatementsTest < ActiveSupport::TestCase | |||
def test_initialize_type_map | |||
initialized_types = SpatialModel.connection.send(:type_map).keys | |||
SpatialModel.with_connection do |connection| | |||
assert connection.connected? |
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.
Probably due to how the adapter is registered now?
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.
A few reviews, to me the Gemfile
part is important. I also have doubts about removing the JRUBY code, is it really bothering us? My opinion is that support will come at some point and that we will just have to write the same code again...
Besides that I think we're pretty good. Thank you for the dedication !
@@ -5,22 +5,25 @@ | |||
module PostGIS | |||
class SchemaStatementsTest < ActiveSupport::TestCase | |||
def test_initialize_type_map | |||
initialized_types = SpatialModel.connection.send(:type_map).keys | |||
SpatialModel.with_connection do |connection| | |||
assert connection.connected? |
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.
Was it flaky before this PR?
I think there is still some misunderstanding in the Gemfile part, to me it is important that we test on the latest AR patch. |
@BuonOmo , I get it. |
So the script you removed allowed to verify that we were properly testing against the latest patch. What you are doing isn't, unless I missed something which you could explain to me ? |
No the script that i removed, pull in each run the list from rubygems , select the last one and use it as a tag. You can bypass the network calls by setting AR_VERSION |
Which means it forces usage of the very last patch, which is what want IMHO! |
fair! I restored the file. |
@seuros I updated my gem to use your current master branch to see how things are running. When I started my application, it crashed at my initializer file The contents of the initializer file are below.
I only have this problem on your branch. Just thought to bring this to your attention. |
Is doing nothing in your case. |
@seuros I agree with you, the code I posted does nothing as it's commented out. However, this code from the documentation (essentially the same as what I posted) results in the same error that I described above.
|
@theonlyriddle, Right! |
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.
LGTM, I think once @theonlyriddle's issue is sorted out we should be good to go!
Here is a working implementation for Rails 7.2
ping @theonlyriddle @anthony0030 @ugisozols @keithdoggett
JRuby code was removed until it start supporting Rails 7.1 and 7.2
closes #395