Skip to content

Conversation

@viragtripathi
Copy link

@viragtripathi viragtripathi commented Jan 21, 2026

Summary

Implements full CockroachDB integration as a source peer, following the same patterns as existing PostgreSQL and MySQL connectors.

What's included

Backend:

  • Native Go connector (490 lines) using pgx driver with CockroachDB-specific configuration
  • Schema introspection: GetSchemas, GetTables, GetColumns
  • Connection support for local and cloud deployments
  • TLS support (disabled by default for easier local development, matching Postgres behavior)
  • SSH tunnel support in backend (intentionally no UI - CockroachDB Cloud doesn't need SSH)
  • Version validation and variant detection (Cloud/Dedicated/Serverless)
  • Rust analyzer and catalog support for peer configuration

Frontend:

  • Complete UI integration for peer creation
  • Form validation and field helpers
  • CockroachDB logo and proper display names

Testing performed

  • ✅ UI peer creation with form validation
  • ✅ API peer creation and validation
  • ✅ Local CockroachDB connection (insecure mode)
  • ✅ Cloud CockroachDB connection (with TLS)
  • ✅ Schema introspection

Design Decisions

TLS Default: Set to false (matching Postgres) for easier local development. Cloud users will enable it as needed.

SSH Support: Backend implementation included but no UI exposed. CockroachDB Cloud deployments (primary use case) don't require SSH tunnels, keeping the UI simpler and more focused.

Note on SQL syntax

SQL syntax support (CREATE PEER FROM COCKROACHDB) requires updates to the sqlparser dependency and will be added in a follow-up PR.

Files changed

23 files changed, 936 insertions(+), 2 deletions(-)

@CLAassistant
Copy link

CLAassistant commented Jan 21, 2026

CLA assistant check
All committers have signed the CLA.

Implements full CockroachDB integration as a source peer with:
- Native Go connector using pgx driver (490 lines)
- Schema introspection (GetSchemas, GetTables, GetColumns)
- Connection support for local and cloud deployments
- TLS support (disabled by default for easier local development)
- SSH tunnel support in backend (no UI for Cloud-focused deployments)
- Version validation and variant detection
- Complete UI integration for peer creation
- Rust analyzer and catalog support

Tested with both local CockroachDB (insecure) and cloud instances (with TLS).

Note: SQL syntax support (CREATE PEER FROM COCKROACHDB) will be added
in a follow-up PR once sqlparser dependency is updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants