-
Notifications
You must be signed in to change notification settings - Fork 37
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
Parse returns postgres scheme for file protocol when directory in path exists #35
Comments
For reference, dependabot has been trying to update to the latest version in our repo here flipt-io/flipt#2483 It is failing because a bunch of our integration tests try and boot with a path like this and suddenly our apps are trying to connect to a postgres that does not exist. |
@GeorgeMac I apologize. I was concerned something like this might happen. The issue is that I decided to make the disk paths more friendly for the databases that use those (SQLite3, MySQL, PostgreSQL, DuckDB). |
Oops, accidentally hit the 'Comment' button before I was finished. There actually is a way to turn this off already, by changing the You may want to fine tune your dependabot configs/settings; personally I hate the thing and turn it off in almost every project I work on. |
I have a quick fix/change that will allow you to disable this behavior in your code. It's incoming, give me a bit. Again, apologies. |
I just pushed import "github.com/xo/dburl"
func init() {
dburl.ResolveSchemeType = false
} |
Nice one @kenshaw ! No worries, thank you for the speedy resolution! |
Just to close the loop on this: flipt-io/flipt#2533 I ended up overriding |
Can you share with me what file extensions, and what driver you're expecting to open? I apologize for the change in behavior, but I updated |
Totally, the examples above are the only extensions and file type (sqlite3) that we depend upon. For context, we do also support postgres, mysql and cockroach drivers. However, I don't think we've necessarily ever communicated to folks that they can use |
Question, do you actually use the |
We do use postgres yes, and mysql and cockroach. We just have historically communicated the explicit |
Since 0.19.1
dburl.Parse
has been returning thepostgres
scheme when provided with afile:
scheme path.This only appears to occur when the path contains a directory that exists on the local filesystem.
The text was updated successfully, but these errors were encountered: