Skip to content
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

Accept postgresql://-schemed database URLs #532

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

yawboakye
Copy link
Contributor

@yawboakye yawboakye commented Aug 18, 2024

According to the official PostgresQL documentation (referenced 18/08/2024), postgresql:// is an acceptable database URL scheme. In fact that's what I use in my application. So I was surprised when River's migrations were failing. Turns out River only supports postgres://-schemed URLs.

Given that postgresq:// is accepted, and perhaps the preferred, I suggest that River accepts it to. Other changes are: fix grammar typo (unsupported instead of unsupport) and printing the URL the command was called with. I think it's good UX, especially if the user passed an environment variable.

Copy link
Contributor

@brandur brandur left a comment

Choose a reason for hiding this comment

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

Wow, odd oversight! The fact that no one's reported this before seems to suggest the sheer ubiquity of the postgres:// convention.

Asked for a couple tweaks here, but LGTM.

cmd/river/rivercli/river_cli.go Outdated Show resolved Hide resolved
cmd/river/rivercli/command.go Outdated Show resolved Hide resolved
@yawboakye yawboakye requested a review from brandur August 19, 2024 09:43
@yawboakye
Copy link
Contributor Author

@brandur i had been waiting for the checks to turn green before requesting for another review, but for reasons i don’t know they’ve stayed amber.

@brandur
Copy link
Contributor

brandur commented Aug 19, 2024

had been waiting for the checks to turn green before requesting for another review, but for reasons i don’t know they’ve stayed amber.

Ah yeah, GitHub requires us to approve CI runs from external contributors for security reasons (in case private vars or such leak into the build and could be extracted).

@brandur
Copy link
Contributor

brandur commented Aug 19, 2024

Thanks!

@brandur brandur merged commit d1bedc7 into riverqueue:master Aug 19, 2024
14 checks passed
brandur added a commit that referenced this pull request Aug 19, 2024
Prepare release v0.11.3, which includes largely #532, which is a
legitimate bug in the CLI.

This will be the first time I try for a release under workspaces (#528),
so it includes a simultaneous release of the CLI and the rest of the
project, although I'm expecting the build to fail due to lack of
`replace` statements.
@brandur brandur mentioned this pull request Aug 19, 2024
brandur added a commit that referenced this pull request Aug 19, 2024
Prepare release v0.11.3, which includes largely #532, which is a
legitimate bug in the CLI.

This will be the first time I try for a release under workspaces (#528),
so it includes a simultaneous release of the CLI and the rest of the
project, although I'm expecting the build to fail due to lack of
`replace` statements.
brandur added a commit that referenced this pull request Aug 19, 2024
Prepare release v0.11.3, which includes largely #532, which is a
legitimate bug in the CLI.

This will be the first time I try for a release under workspaces (#528),
so it includes a simultaneous release of the CLI and the rest of the
project, although I'm expecting the build to fail due to lack of
`replace` statements.
@yawboakye yawboakye deleted the accept-postgresql-uri-scheme branch August 19, 2024 15:48
@arp242
Copy link
Contributor

arp242 commented Aug 31, 2024

The fact that no one's reported this before seems to suggest the sheer ubiquity of the postgres:// convention.

I ran into this as well a few weeks ago; I just changes postgresql:// to postgres://and called it a day 🙃

In-between doing a ton of other things and "just trying out this River thing to see if it works for us" (it does), I just never got around to reporting it.

I would be surprised if I was the first person. I've often found that getting feedback on these types of small things can be very difficult.

@brandur
Copy link
Contributor

brandur commented Sep 3, 2024

@arp242 Ah, fair enough. We used to have a rule of thumb at my last job that "for every one user that opened a support ticket, 10 users ran into the same problem and didn't". That's probably what happened here.

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.

3 participants