neosync
neosync copied to clipboard
Allow arbitrary query string variables in database URI
Is your feature request related to a problem?
In our setup we fetch data from kubernetes secrets to add the database URIs to neosync API and neosync Worker for use in MySQL connections. The secret, however contains a serverVersion=xxx variable in the URI for use in our Symfony applications. It is currently not possible for us to change this and when we use this URI for connections in neosync it will throw an error that the serverVersion parameter is not supported by the underlying driver.
Describe the solution you'd like
It would be nice if neosync would strip unsupported query string variables from the URI before passing it to the underlying driver to prevent such errors.
Describe alternatives you've considered
We are re-using the existing datbase URI secret in order to hide the actual connection information from neosync users. To circumvent this we currently have added the URI manually to the UI, however this is not desirable for us.
Additional context
Thank you for your feature request – we love each and every one!
Thanks for logging the issue. We use the go-mysql-driver: https://github.com/go-sql-driver/mysql
They list there what URL parameters are supported. However, I didn't realize they would reject arbitrary parameters. I typically don't like to touch the params a user provides due to ultimately not knowing what specific DB requirements need to be met. I'll have to test this out a little bit more and further reproduce to understand the issue better.