-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Bump to 7.2.0 #405
Bump to 7.2.0 #405
Changes from 32 commits
a62542d
c21dbce
28cab3a
b4ed5bf
bc31a28
5fd9f6c
3be96f9
eee50f6
ec1c5ef
342fcb2
4951a6b
b774ae2
d1a4e1e
2eef5aa
bbc38b4
9fb267c
69012e3
ada1f96
0064eea
9dab4f5
eea4b76
763cef8
acbe7c8
485ccb5
7d58504
7b13ba6
42e8e55
956e5f8
4f6ebe6
04dd527
ac74f4e
435027d
ecf8ef3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
open_collective: rgeo |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env ruby | ||
|
||
$:.unshift(File.expand_path("../lib", __dir__)) | ||
|
||
# require "bundler/setup" | ||
# Bundler.require :development | ||
# | ||
require "activerecord-postgis-adapter" | ||
|
||
db_name = "activerecord_postgis_adapter_console" | ||
system("psql -c 'drop database if exists #{db_name}' postgres", | ||
exception: true) | ||
system("psql -c 'create database #{db_name}' postgres", | ||
exception: true) | ||
system(psql = "psql -c 'create extension postgis' #{db_name} ", exception: true) | ||
|
||
ActiveRecord::Base.establish_connection( | ||
adapter: "postgis", | ||
database: db_name | ||
) | ||
|
||
class Country < ActiveRecord::Base | ||
end | ||
|
||
ActiveRecord::Schema.define do | ||
create_table(:countries) do |t| | ||
t.st_polygon(:area, srid: 4326) | ||
t.string(:name) | ||
end | ||
end | ||
|
||
require "irb" | ||
IRB.start(__FILE__) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ | |
require_relative "postgis/oid/spatial" | ||
require_relative "postgis/oid/date_time" | ||
require_relative "postgis/type" # has to be after oid/* | ||
require_relative "postgis/create_connection" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the only actual needed change according to the current test suite, but I'm trying with the whole rails test suite to be sure we do not miss anything |
||
# :startdoc: | ||
|
||
module ActiveRecord | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'active_record' | ||
require "active_record" | ||
require "active_record/connection_adapters" | ||
require "rgeo/active_record" | ||
ActiveRecord::ConnectionAdapters.register("postgis", "ActiveRecord::ConnectionAdapters::PostGISAdapter", "active_record/connection_adapters/postgis_adapter") |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ class InvalidAttribute < ActiveRecord::Base | |
|
||
class AttributesTest < ActiveSupport::TestCase | ||
def setup | ||
reset_spatial_store | ||
create_foo | ||
create_spatial_foo | ||
create_invalid_attributes | ||
|
@@ -99,20 +98,20 @@ def test_joined_spatial_attribute | |
private | ||
|
||
def create_foo | ||
Foo.connection.create_table :foos, force: true do |t| | ||
Foo.lease_connection.create_table :foos, force: true do |t| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these test case work in isolation There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean if you run any test that break alone, it works. Something wrong with CI that we should fix. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for act, I am still unsure about your first point though.. |
||
end | ||
end | ||
|
||
def create_spatial_foo | ||
SpatialFoo.connection.create_table :spatial_foos, force: true do |t| | ||
SpatialFoo.lease_connection.create_table :spatial_foos, force: true do |t| | ||
t.references :foo | ||
t.st_point :geo_point, geographic: true, srid: 4326 | ||
t.st_point :cart_point, srid: 3509 | ||
end | ||
end | ||
|
||
def create_invalid_attributes | ||
InvalidAttribute.connection.create_table :invalid_attributes, force: true do |t| | ||
InvalidAttribute.lease_connection.create_table :invalid_attributes, force: true do |t| | ||
end | ||
end | ||
end | ||
|
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.
i think the whole suite is flaky.
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.
I'll look at it. I have good experience with this suite now that I maintain the CRDB adapter. It usually is flaky due to some tests modifying the db. Which they should not do if they are correctly changed for our use case. Do you have any further information?
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.
Just this : #378
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.
Thx, I plan on excluding using
minitest-exclude
and opening an issue for excluded testsThere 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.
@BuonOmo yeah I hadn't figured out how to replicate the exclusions like in the CRDB adapter, but we definitely need that here since some are failing (which is expected). But to @seuros 's point that's why I just left the postgis tests for 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.
Now we only have Postgis basic tests flaky. If one of you has time to look into it it would be much appreciated. Otherwise maybe we can skip them for now and make this or top priority issue, just so we can release this ?
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.
@BuonOmo so just to make sure I'm clear, there's a few
postgis
tests that were working and are now flakey? I can try to work through some of them. Is it only in the CI?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.
I noticed some of the tests failures are order related.
notes here: #405 (comment)