Skip to content

[FEATURE] Add test datasource connection button - #99

Merged
jgbernalp merged 6 commits into
perses:mainfrom
adrianSepiol:add-test-connection-button
Aug 19, 2026
Merged

[FEATURE] Add test datasource connection button#99
jgbernalp merged 6 commits into
perses:mainfrom
adrianSepiol:add-test-connection-button

Conversation

@adrianSepiol

@adrianSepiol adrianSepiol commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

…Button for testing datasource connections

Related pull requests (in order):

  1. [BUGFIX] set correct ContentLength for request body perses#4007
  2. This one
  3. [FEATURE] integrate test datasource connection button into DatasourceDrawer perses#4008
  4. [BREAKINGCHANGE] Replace local buildProxyUrl with shared implementation from @perses-dev/client perses#4302
  5. [FEATURE] add test connection button to prometheus plugin plugins#620

Related issue:
perses/perses#1542

Description

Adds a Test Connection button to the datasource editor that validates connectivity before saving. The button is wired through the editor component chain (DatasourceEditorForm → PluginEditor → PluginSpecEditor) where the connection logic is bound to the plugin's healthCheckPath and the current project/dashboard context. As part of this, buildProxyUrl is also migrated to @perses-dev/client, replacing the local implementation in perses/ui/app that will be removed in a companion PR.

Screenshots

In perses/plugins#620

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.
  • E2E tests are stable and unlikely to be flaky.
    See e2e docs for more details. Common issues include:
    • Is the data inconsistent? You need to mock API requests.
    • Does the time change? You need to use consistent time values or mock time utilities.
    • Does it have loading states? You need to wait for loading to complete.

@adrianSepiol
adrianSepiol marked this pull request as ready for review April 7, 2026 09:30
@adrianSepiol
adrianSepiol requested a review from a team as a code owner April 7, 2026 09:30
@adrianSepiol
adrianSepiol marked this pull request as draft July 27, 2026 12:51
@adrianSepiol
adrianSepiol force-pushed the add-test-connection-button branch 3 times, most recently from 3df35e7 to 6e06d51 Compare July 27, 2026 14:19
@adrianSepiol
adrianSepiol marked this pull request as ready for review July 27, 2026 14:23
@adrianSepiol
adrianSepiol force-pushed the add-test-connection-button branch from 6e06d51 to bcda582 Compare July 27, 2026 14:31
@adrianSepiol adrianSepiol changed the title [ENHANCEMENT] Add UnsavedDatasourceStore and DatasourceTestConnection… [FEATURE] Add test datasource connection button Jul 27, 2026
Comment thread plugin-system/src/components/PluginSpecEditor/PluginSpecEditor.tsx Outdated
Comment thread client/src/model/datasource-api.ts Outdated
Comment thread plugin-system/src/model/plugin-base.ts Outdated
@adrianSepiol
adrianSepiol force-pushed the add-test-connection-button branch from 45bba07 to 3dc45bf Compare July 28, 2026 16:17
@adrianSepiol
adrianSepiol requested a review from jgbernalp August 11, 2026 08:11
Comment thread client/src/model/datasource-api.ts Outdated
Comment thread client/src/model/datasource-api.ts Outdated
Comment thread plugin-system/src/components/PluginSpecEditor/PluginSpecEditor.test.tsx Outdated
@adrianSepiol
adrianSepiol force-pushed the add-test-connection-button branch from 3dc45bf to 45c6b62 Compare August 12, 2026 13:31
Comment thread plugin-system/src/components/PluginSpecEditor/PluginSpecEditor.tsx

@jgbernalp jgbernalp 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.

LGTM, sorry for the delay. As a follow up we can add the test button to the global datasources as well

@jgbernalp

Copy link
Copy Markdown
Contributor

@adrianSepiol might need a rebase

Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
…ht to prevent duplicate calls

Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
…h check path

Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
…ceSpecEditor component

Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
…serting into allowedEndpoints endpointPattern

Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
@adrianSepiol
adrianSepiol force-pushed the add-test-connection-button branch from 45c6b62 to afa4b63 Compare August 18, 2026 10:44
…on validation

Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
@adrianSepiol
adrianSepiol force-pushed the add-test-connection-button branch from afa4b63 to 724c245 Compare August 18, 2026 12:09
@jgbernalp
jgbernalp merged commit f91a983 into perses:main Aug 19, 2026
13 checks passed
@adrianSepiol
adrianSepiol deleted the add-test-connection-button branch August 19, 2026 11:23
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