Repository navigation
Feature: add interactive connection setup wizard - #8
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are we changing this?
omni connections createonly worked with--file, which made connection setup awkward for new users and hard to discover from the CLI itself. We now have working auth and live sandbox validation for connection creation, so the next gap is giving users a first-run path that matches the product better.What has changed?
omni connections createwizard in internal/cli/connections.go while keeping--fileas the automation path.postgres,redshift,mysql,mariadb,mssql,snowflake,databricks,bigquery,athena,motherduck,clickhouse,exasol,starrocks, andtrino.warehouse,region,defaultSchema,trustServerCertificate, Snowflake private-key auth, and BigQuery service-account JSON.connections createis file-only.Implementation note: there is still no public connection delete/archive endpoint in the bundled Omni API spec, so the sandbox connection created during live validation remains in
hawkfry-sandbox.How to test it and expected results?
Run
go test ./...Expected result: all packages pass.
Run
go build -o bin/omni ./cmd/omniExpected result: the CLI binary builds successfully.
Run
./bin/omni --json connections createExpected result: the CLI starts an interactive wizard and prompts for dialect-specific fields.
Enter a Postgres example such as:
Dialect: leave defaultpostgresDisplay name:Wizard Coverage PostgresHost:db.example.internalPort: accept5432Database:analyticsUsername:omniPassword: any placeholder valueExpected result: the command returns success JSON with a connection ID.
Run
./bin/omni --json connections list --name "Wizard Coverage Postgres"Expected result: the created connection is returned.
Live validation used
https://hawkfry-sandbox.omniapp.co/and successfully created connectiondb091329-44e1-494d-a212-09295ff3e037through the wizard.Checklist: