mirror of
https://github.com/Kaelio/ktx.git
synced 2026-07-01 08:59:39 +02:00
feat(cli): extend ktx connection test to every supported driver (#92)
* feat(cli): extend `ktx connection test` to every supported driver Dispatch by driver: native DBs now call `connector.testConnection()` (was `introspect(dryRun)`), looker/notion/metabase hit their auth endpoints, and dbt/metricflow/lookml run `git ls-remote` via the existing `testRepoConnection` helper. Unknown drivers exit 1 with a listing of supported ones. * feat(cli): add `ktx connection test --all` summary list Tests every configured connection in parallel and renders a single Clack-style list (◇/│/◆/└, green ✓ / red ✗) consistent with sl list, with per-row detail and a passed/failed footer. Exits non-zero if any connection fails. Single-id `ktx connection test` output is preserved. * fix(cli): read metabase status url from api_url `ktx status` was probing `url` / `base_url` on metabase connections, but ktx.yaml stores it as `api_url`, so the field always reported "url not set". Read `api_url` directly and align the warning text with the actual key.
This commit is contained in:
parent
b3be54e3fa
commit
c7c5f63a66
12 changed files with 683 additions and 127 deletions
|
|
@ -369,6 +369,7 @@ export type {
|
|||
KtxQueryResult,
|
||||
KtxReadOnlyQueryInput,
|
||||
KtxResolvedCredentialEnvelope,
|
||||
KtxConnectorTestResult,
|
||||
KtxScanArtifactPaths,
|
||||
KtxScanConnector,
|
||||
KtxScanContext,
|
||||
|
|
|
|||
|
|
@ -283,12 +283,18 @@ export interface KtxTableListEntry {
|
|||
kind: 'table' | 'view';
|
||||
}
|
||||
|
||||
export interface KtxConnectorTestResult {
|
||||
success: boolean;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface KtxScanConnector {
|
||||
id: string;
|
||||
driver: KtxConnectionDriver;
|
||||
capabilities: KtxConnectorCapabilities;
|
||||
eventStreamDiscovery?: KtxEventStreamDiscoveryPort;
|
||||
introspect(input: KtxScanInput, ctx: KtxScanContext): Promise<KtxSchemaSnapshot>;
|
||||
testConnection?(): Promise<KtxConnectorTestResult>;
|
||||
sampleColumn?(input: KtxColumnSampleInput, ctx: KtxScanContext): Promise<KtxColumnSampleResult>;
|
||||
sampleTable?(input: KtxTableSampleInput, ctx: KtxScanContext): Promise<KtxTableSampleResult>;
|
||||
columnStats?(input: KtxColumnStatsInput, ctx: KtxScanContext): Promise<KtxColumnStatsResult | null>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue