You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the specification of host and port must be in form "{host}:{port}".
In many cases the url to check is already present in the system configuration in form of connection parameter, e.g.: postgres://username:password@hostname:5432/database.
However, current implementation does not seem to accept such host and port specification.
Proposed solution:
require presence of explicit host and port in the url
rsplit the url on colon :
hostname: take the left part: rsplit on / or @, take the last element
port: take the right part, split on /, take the first element. Check that it includes only digits.
There are very likely better options, I just wanted to express that to me it seems very acceptable to require explicit hostname and port presence to keep the implementation small and simple.
The text was updated successfully, but these errors were encountered:
This could be an interesting proposal. Anyway, I would like to think about it a little more.
What is your use case exactly? Do you have a variable with the complete connection string and you want to reuse it?
Keeping all configuration parameters for single backing service in one connection string seems practical as it can be handled as one item (one can argue, secrets shall be separated, but I would say the whole connection string could be considered a secret)
And my need is to test (on TCP level) availability of those backing services using just these urls. This I do before starting actual dependent process/application.
To keep implementation simple, I would require that the url must:
explicitly express the port (so that we can ignore the scheme prefix and relevant default ports for such scheme)
explicitly express the host (so that we can skip the decision, what is the default host)
Currently the specification of host and port must be in form "{host}:{port}".
In many cases the url to check is already present in the system configuration in form of connection parameter, e.g.:
postgres://username:password@hostname:5432/database
.However, current implementation does not seem to accept such host and port specification.
Proposed solution:
:
/
or@
, take the last element/
, take the first element. Check that it includes only digits.There are very likely better options, I just wanted to express that to me it seems very acceptable to require explicit hostname and port presence to keep the implementation small and simple.
The text was updated successfully, but these errors were encountered: