-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Missing port in connection string results in server crash #3344
Comments
Thanks for reporting this, @domdomegg. Sorry you experienced a bit of friction here. I agree that we should infer 5432 if the port is missing, as that would lead to a smoother experience in cases like yours. Interestingly though, in Mathesar 0.1.4 we are moving the entire database connection configuration into the UI which I think will obviate the friction you experienced. For example, as in this mockup of the "New Connection" form, the "Port" field will be required and automatically filled with 5432. We're still not entirely sure what level of support we'd like to offer for administrators to configure connections through the I'm going to leave this open for now but mark it for discussion at our January "Product approval" meeting where we'll help determine the next steps. |
Sure. If it helps, I'd be fine with configuring the Mathesar databases from the UI and dropping |
Related: #3355 The current plan, as I see it, is to remove the documentation of this variable from the user-facing docs, since the main use of it moving forward is simply to allow for setting up test DBs when running our test suite. I think that should resolve any confusion for new users. For already-existing users who may be using the variable, we may need to add some kind of note to warn them that changes to that variable will not have expected results w.r.t. their installation's DB connections. (Such modifications always had odd results; part of the reason for removing the variable). Once we have the test suite sorted without that variable, we'll likely deprecate it, then remove support entirely. |
We discussed this briefly today, just to make sure our plan is solid.
Because |
Description
When configuring Mathesar, I set
MATHESAR_DATABASES
to something like(db|postgresql://u:[email protected]/db)
Actual behavior
Server crashes on attempting to connect to this database, with the stacktrace:
Stacktrace
Note: it appears to only do this for the
MATHESAR_DATABASES
option. InDJANGO_DATABASE_URL
the port can be omitted any everything works fine, which makes this error more confusing to users.Expected behavior
I expected the connection to work, as the connection string had been copied from another application that was working (which was assuming a 5432 default postgres port).
Alternatively in hindsight, I would have expected a clearer error message stating the port was mandatory (maybe ideally with the web server stating this to help users debug it quickly).
To Reproduce
Set
MATHESAR_DATABASES
to something like(db|postgresql://u:[email protected]/db)
Environment
Mathesar 0.1.3
Additional context
This is low priority for us, given we've now figured it out. But maybe helpful to fix to simplify onboarding for new users.
The text was updated successfully, but these errors were encountered: