Skip to content

feat(sdk): test connection button for Workflow Insight destination#715

Merged
ParidelPooya merged 1 commit into
mainfrom
feat/insight-test-connection
Jul 14, 2026
Merged

feat(sdk): test connection button for Workflow Insight destination#715
ParidelPooya merged 1 commit into
mainfrom
feat/insight-test-connection

Conversation

@ParidelPooya

Copy link
Copy Markdown
Contributor

Bug bash feedback: switching the Explorer to S3 + Athena closes the Settings modal almost immediately, with no clear signal that the destination is configured correctly or that the backing resources exist. Adds a "Test connection" button to the Data Source tab that runs read-only checks against the current (unsaved) form values and reports a per-check pass/fail inline — the modal stays open — so users can confirm a destination is reachable and its config complete before saving or querying.

Host:

  • New destinationTest.ts: testDestination(cfg) returns { ok, summary, checks[] } and dispatches per destination type. All probes are read-only.
    • S3 + Athena: required-field completeness; a note when neither workgroup nor result location is set (the "primary workgroup with no output location" trap); Glue table existence (reported as "will be created on Save" when absent, not a failure); and a real SELECT 1 that exercises the workgroup / output location / permissions.
    • DynamoDB: DescribeTable. Aurora: SELECT 1 via the RDS Data API. SQS: GetQueueAttributes. CloudWatch Logs: exact-name DescribeLogGroups.
  • config.ts: factor the settings normalization out of readConfig into a shared helper and add configFromWireSettings(), so the test can validate the webview's unsaved values without persisting them.
  • extension.ts: handle a new "testDestination" message; post the outcome back as a "destinationTestResult" payload (not the global error toast) so it renders inline in the modal.

Webview:

  • SettingsModal.tsx: "Test connection" button plus a success/error Alert listing each check; the result clears when the modal reopens or the destination changes. App.tsx/types.ts: message plumbing and shared report types.

Tests: destinationTest.test.ts (per-destination success, connectivity failure, and completeness paths) and config.test.ts (configFromWireSettings mapping, defaults, and coercion). Host suite 156 passing; host + webview builds green.

…ttings

Bug bash feedback: switching the Explorer to S3 + Athena closes the Settings
modal almost immediately, with no clear signal that the destination is
configured correctly or that the backing resources exist. Adds a "Test
connection" button to the Data Source tab that runs read-only checks against
the current (unsaved) form values and reports a per-check pass/fail inline —
the modal stays open — so users can confirm a destination is reachable and
its config complete before saving or querying.

Host:
- New destinationTest.ts: testDestination(cfg) returns { ok, summary, checks[] }
  and dispatches per destination type. All probes are read-only.
    - S3 + Athena: required-field completeness; a note when neither workgroup
      nor result location is set (the "primary workgroup with no output
      location" trap); Glue table existence (reported as "will be created on
      Save" when absent, not a failure); and a real SELECT 1 that exercises the
      workgroup / output location / permissions.
    - DynamoDB: DescribeTable. Aurora: SELECT 1 via the RDS Data API.
      SQS: GetQueueAttributes. CloudWatch Logs: exact-name DescribeLogGroups.
- config.ts: factor the settings normalization out of readConfig into a shared
  helper and add configFromWireSettings(), so the test can validate the
  webview's unsaved values without persisting them.
- extension.ts: handle a new "testDestination" message; post the outcome back
  as a "destinationTestResult" payload (not the global error toast) so it
  renders inline in the modal.

Webview:
- SettingsModal.tsx: "Test connection" button plus a success/error Alert listing
  each check; the result clears when the modal reopens or the destination
  changes. App.tsx/types.ts: message plumbing and shared report types.

Tests: destinationTest.test.ts (per-destination success, connectivity failure,
and completeness paths) and config.test.ts (configFromWireSettings mapping,
defaults, and coercion). Host suite 156 passing; host + webview builds green.
@ParidelPooya
ParidelPooya force-pushed the feat/insight-test-connection branch from cad5a73 to 1bfd822 Compare July 14, 2026 16:20

@yaythomas yaythomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@ParidelPooya
ParidelPooya marked this pull request as ready for review July 14, 2026 17:21
@ParidelPooya
ParidelPooya merged commit ccebcbc into main Jul 14, 2026
26 of 27 checks passed
@ParidelPooya
ParidelPooya deleted the feat/insight-test-connection branch July 14, 2026 17:21
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