activerecord-postgis-adapter icon indicating copy to clipboard operation
activerecord-postgis-adapter copied to clipboard

Bump to 7.2.0

Open BuonOmo opened this issue 1 year ago • 11 comments

Closes #403 Closes #395

BuonOmo avatar Sep 04 '24 12:09 BuonOmo

Hey @BuonOmo! Thanks for the great work you've done so far on support for Rails 7.2!

I've tried switching to this branch and upgrading to Rails 7.2.

Here's the error I'm getting when I try to load my ActiveAdmin dashboard page, I don't know how to take it from here. I hope it's useful to you: Screenshot 2024-09-10 at 14 25 49

Thanks!

vfonic avatar Sep 10 '24 17:09 vfonic

@vfonic I think your issue is not related to this adapter. To make sur of this you can replace the activerecord adapter with postgresql and see if you still have the failure.

If it is related though could you open an issue with a reproducible example ? Or at least a stack trace and a gemfile.lock so I could investigate?

BuonOmo avatar Sep 11 '24 14:09 BuonOmo

Thanks @BuonOmo, I'll have a look.

What do you mean by

replace the activerecord adapter with postgresql and see if you still have the failure.

?

Thanks!

vfonic avatar Sep 11 '24 18:09 vfonic

@vfonic in your codebase, stop using active-record-postgis-adapter, and in your database configuration file (likely database.yml) set postgres instead of postgis. And check if this error still occurs.

BuonOmo avatar Sep 12 '24 04:09 BuonOmo

I'm not sure I can have the test suite fixed tonigh as I spent already all my afternoon on it, so here are some notes for someone (might be me, later) that want to pick that up.

The test suite gets corrupted at some point. Some setup change (likely the spatial_factory_store) and it is not properly reset. The whole challenge is to find which test is the culprit, fix it. The second step would be to avoid a potential reproduction of this issue (I left a TODO addressing this in the code, only useful if my assumptions were right).

If I were to continue on this, I would replace the teardown block added with something more precise that directly detects the state corruption.

BuonOmo avatar Oct 07 '24 16:10 BuonOmo

Can you store the identity of the object (object_id) of the model (go Ruby!) on spinup and compare it on teardown as a quick way to check if it has changed?

mjy avatar Oct 08 '24 19:10 mjy

@mjy it does change actually, we reinstanciate a new factory pretty often ! So the object id is not enough unfortunately :/

BuonOmo avatar Oct 09 '24 11:10 BuonOmo

Made some attempts focusing on test:postgis, the flakiness seems related to order the tests run. I am not sure if the same SEED param will make the results deterministic across architectures, but these are these are some repeatable results I got by fixing the seed param.

$ SEED=170 ARCONN=postgis bundle exec rake test:postgis
66 runs, 223 assertions, 0 failures, 0 errors, 0 skips
$ SEED=1 ARCONN=postgis bundle exec rake test:postgis
66 runs, 206 assertions, 3 failures, 1 errors, 0 skips
$ SEED=2 ARCONN=postgis bundle exec rake test:postgis
66 runs, 218 assertions, 4 failures, 0 errors, 0 skips

formigarafa avatar Oct 13 '24 21:10 formigarafa

I've got to something more specific: BasicTest#test_save_and_load_point fails when it runs after BasicTest#test_spatial_factory_attrs_parsing.

formigarafa avatar Oct 13 '24 22:10 formigarafa

Please have a look at #412 . Existing tests are passing, now.

formigarafa avatar Oct 14 '24 03:10 formigarafa

@seuros I'm not sure I get you. Yes we should keep the files I added, they correspond to failing tests! And let's track them in the related issue #378.

BuonOmo avatar Oct 17 '24 12:10 BuonOmo

About these ignore files: are they working as temporary to reduce the noise while this work is done (like a skip), are they mostly definitive like for unnecessary tests or tests that do not apply in the context of PostGIS or are they a mix of both?

I am asking because I've made a few adjustments to make the ignored test appear as skipped to have an idea of the size of the problem and I wouldn't mind sharing that if it appears useful to get over of what is missing.

formigarafa avatar Oct 25 '24 00:10 formigarafa

@formigarafa I think they would be a mix of both. I haven't checked them individually besides just seeing that they were failing.

I am asking because I've made a few adjustments to make the ignored test appear as skipped to have an idea of the size of the problem and I wouldn't mind sharing that if it appears useful to get over of what is missing.

This looks like a change for the gem responsible of ignoring tests ? Anyway, feel free to submit this!

BuonOmo avatar Oct 25 '24 09:10 BuonOmo

@keithdoggett lets go! Thank you :)

I'll take a look at the new PR #415 soon, but I guess we could already push this, and have a patch release for rake task fix

BuonOmo avatar Nov 01 '24 09:11 BuonOmo

v10.0.0 is released. 9.0-stable branch also up if anyone wants to build directly from git for AR7.1. Thanks everyone!

keithdoggett avatar Nov 04 '24 20:11 keithdoggett