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

Validate connectivity to all connection strings when adding/editing a source #10664

Open
daniel-chambers opened this issue Jan 28, 2025 · 1 comment
Labels
c/v2-engine k/enhancement New feature or improve an existing feature v2-engine v2-server v2

Comments

@daniel-chambers
Copy link
Contributor

Is your proposal related to a problem?

Currently Hasura does not validate all of a source's connection strings when adding or editing a source's configuration. A source may have multiple read-replicas specified and Hasura will only check one of the read-replica connection strings at random.

This is because "checking a connection string" actually means "performing database introspection". When Hasura introspects the database, it performs a read only query, which chooses a read-replica at random to run on. This means that if one of your read replica connection strings is incorrect (or if your primary connection string is incorrect) your source update may succeed because the introspection operation executed against a working read-replica connection string and the other connection strings were not looked at.

This results in Hasura queries to that source failing sporadically if the query is issued to a broken connection string.

Describe the solution you'd like

I want the source creation/update only to succeed if all connection strings (primary + all replicas) result in successful database connection. That way, I can be confident that when I create/update my source, all my configuration is correct and that none of my incoming requests will hit a broken connection string and fail.

@daniel-chambers daniel-chambers added k/enhancement New feature or improve an existing feature v2 v2-engine labels Jan 28, 2025
@daniel-chambers daniel-chambers changed the title Validate connectivity to all connection strings when add/editing a source Validate connectivity to all connection strings when adding/editing a source Jan 28, 2025
@seanparkross
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/v2-engine k/enhancement New feature or improve an existing feature v2-engine v2-server v2
Projects
None yet
Development

No branches or pull requests

2 participants