Skip to content

Conversation

@BuonOmo
Copy link
Member

@BuonOmo BuonOmo commented Nov 24, 2025

Follow up on the work of @t27duck on #435.

Closes #434

TODO:

  • tests passing
  • squash and refer to changes in rails
  • correct postgis image in test if existing ? There is not yet a 18-master, and I'm not sure we want to point to postgis' test branch anyway.

t27duck and others added 6 commits October 15, 2025 14:31
- Handle `cast_type` being the second parameter for `SpatialColumn.initialize`.
- Handle nil case during OID initiation.
- Handle case where in `spatial_factory` the object could be frozen for whatever reason.
- Update CI to test against 8.1 and supported PG and Rubies.
@BuonOmo BuonOmo force-pushed the feat/rails-8-1 branch 3 times, most recently from 8add7aa to 8c5e033 Compare November 24, 2025 11:02
@BuonOmo BuonOmo requested review from keithdoggett and teeparham and removed request for teeparham November 24, 2025 11:26
Comment on lines +56 to +58
def views
super - %w[geography_columns geometry_columns]
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a tiny doubt whether we want that behavior, thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's probably fine to exclude it. My feel is that this should return the views that the user defines in the app. I'd imagine anything that needs to access these views would not check this first and query them directly so them not being included in this is fine.

Also this is consistent with us excluding spatial_ref_sys from the schema dump IMO.

@t27duck
Copy link
Contributor

t27duck commented Nov 24, 2025

Hooked up this branch to my app and put it through some paces and ran it through the app's test suite. At least for the features I use, this looks ok to me.

Comment on lines +56 to +58
def views
super - %w[geography_columns geometry_columns]
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's probably fine to exclude it. My feel is that this should return the views that the user defines in the app. I'd imagine anything that needs to access these views would not check this first and query them directly so them not being included in this is fine.

Also this is consistent with us excluding spatial_ref_sys from the schema dump IMO.

Comment on lines +25 to +48
run: |
# https://www.postgresql.org/support/versioning/
pg_targets='[14, 15, 16, 17, 18]'
tags=$(
curl -s "https://hub.docker.com/v2/repositories/postgis/postgis/tags?page_size=100" |
jq --compact-output '
.results
| map(.name) as $tags
| '"$pg_targets"'
| map(
. as $target
| $tags
| map(select(test("^\($target)-\\d+\\.\\d+$")))[0]
)
'
)
if [[ $(jq 'length' <<< "$tags") -ne $(jq 'length' <<< "$tags") ]]; then
echo "Error: Could not find tags for all PostgreSQL targets" >&2
exit 1
fi
echo "postgis_tags=$tags" >> $GITHUB_OUTPUT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the reasoning behind needing to do this instead of an array of versions? is it just because postgis does not have the same versions as postgres in docker?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly the postgis version vary depending on on the pg version. Here we ensure we are using the latest, yet not the master branch. This is the most likely used by users of this repo IMO. We could also consider adding postgis to the matrix, and just check if version tags exists. Something like:

jobs:
  orchestrate:
    matrix:
      postgres: [14, 15, ..]
      postgis: [3.5, 3.6]
    output:
      tags: ...
    run: Check if matrix elements contain tags

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok got it. Seems fine as if. If there's issues with versioning for some reason later we could move to the tags you suggested but doesn't seem like a problem

@BuonOmo
Copy link
Member Author

BuonOmo commented Nov 25, 2025

Merging now! I'll prepare a release tomorrow morning (UTC) :)

@BuonOmo BuonOmo merged commit 542dcd0 into master Nov 25, 2025
17 checks passed
@BuonOmo
Copy link
Member Author

BuonOmo commented Nov 25, 2025

@t27duck and others pointing to this branch, I'll delete it once published to rubygem.

@BuonOmo BuonOmo deleted the feat/rails-8-1 branch November 29, 2025 18:12
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.

Rails 8.1 compatibility

4 participants