- Notifications
You must be signed in to change notification settings - Fork 636
Enable postgis extensions automatically #2760
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
Enable postgis extensions automatically #2760
Conversation
on postgis images Issue: [sc-12487]
internal/postgis/postgis.go Outdated
| // - postgis | ||
| // - postgis_topology | ||
| // - fuzzystrmatch | ||
| // - postgis_tiger_geocoder |
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.
⛏️ indentation appears to be off in this comment.
Issue [sc-12487]
| r.Recorder.Event(cluster, corev1.EventTypeWarning, "postgisDisabled", | ||
| "Unable to install postgis") |
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.
🔧 Event reasons should be upper camel case (aka title case) and the message should capitalize PostGIS the way they've chosen (their proper noun).
| r.Recorder.Event(cluster, corev1.EventTypeWarning, "postgisDisabled", | |
| "Unable to install postgis") | |
| r.Recorder.Event(cluster, corev1.EventTypeWarning, "PostGISDisabled", | |
| "Unable to install PostGIS") |
Separately, I see that the reason for pgAudit a few lines up is not upper camel case. 🤔 I'm not sure what to do in that situation. I really dislike getting pg, Pg, and PG wrong in names, but we have two conflicting rules in that spot. The rules make me think it should be PgAudit 😢 🤢
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.
To make sure I understand: (1) event reasons should be TitleCase, but (2) we respect capitalization for proper names, so what do we do when the rules dictate different things?
Given this situation, it makes sense to me that pgAuditDisabled => PgAuditDisabled (similar to how our package is pgaudit, not pgAudit -- it's a thing referring to pgAudit, it is not pgAudit itself, if that makes any sense). But that's the only place that I think it should change (though that will make case sensitive searching more aggravating).
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.
Per slack discussion, the pgAudit issue shouldn't be a blocker for 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.
To make sure I understand: (1) event reasons should be TitleCase, but (2) we respect capitalization for proper names, so what do we do when the rules dictate different things?
Right.
Issue [sc-12487]
jmckulk left a comment
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.
Looks good to me!
| - uses: nolar/setup-k3d-k3s@v1 | ||
| with: | ||
| version: "${{ matrix.kubernetes }}" | ||
| k3d-tag: v4.4.8 |
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'd like to see changes like this as separate commits ⛏️
| "Unable to install pgAudit; try restarting PostgreSQL") | ||
| } | ||
| | ||
| // Enabling PostGIS extensions is a one-way operation |
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 like the comment(s) 👍
* Enable postgis extensions automatically on postgis images Issue: [sc-12487]
Checklist:
Type of Changes:
What is the current behavior? (link to any open issues here)
When a postgis image starts, the user still needs to enable all the postgis extensions.
What is the new behavior (if this is a feature change)?
Automatically enable postgis and related extensions for postgis images only.
Note: I didn't see any place in the documentation where this change would need to be updated.
Other information:
[sc-12487]