Repository navigation
docs: clarify that default connections are not merged into gateways - #6089
Conversation
default_connection, default_test_connection and default_scheduler are used only when a gateway omits the matching key. A gateway that sets its own connection does not inherit fields such as type from the default. Also remove the in-memory DuckDB default listed for default_connection. Without it, a gateway with no connection fails with 'No connection configured'; the DuckDB default applies only to default_test_connection. Closes SQLMesh#4105 Signed-off-by: Adegbite Ayoade <tripleaceme@gmail.com>
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
Description
Closes #4105.
The configuration guide and reference both described
default_connection,default_test_connectionanddefault_scheduleras "shared defaults across multiple gateways", which reads as if a gateway can inherit individual fields (liketype) from them. That is not how they work.Config.get_connectionreturnsgateway.connection or self.default_connection, and the test connection and scheduler follow the same pattern, so a default is only used when a gateway leaves the key out entirely.Changes:
docs/guides/configuration.mdanddocs/reference/configuration.md: reword the section intro and add a paragraph saying the default is a fallback for gateways that omit the key, and that fields are not merged.docs/reference/configuration.md: remove "Default: A DuckDB connection that creates an in-memory database" from thedefault_connectionrow.default_connectiondefaults toNone, and a gateway with no connection fails withNo connection configured for gateway '<name>'. The in-memory DuckDB default only applies todefault_test_connection(Config.get_default_test_connection), so that row is unchanged.Test Plan
Docs only. I checked both behaviours against sqlmesh 0.236.2 with a DuckDB project:
connection: {database: local.db}plusdefault_connection: {type: duckdb}fails withMissing connection type., which is the case reported in the issue.connectionand nodefault_connectionfails withNo connection configured for gateway 'local'.Checklist
make styleand fixed any issuesmake fast-test) (not run, no code changes)git commit -s) per the DCOSummary by CodeRabbit
default_connectiondescription.