From 59ec6377928f2547bda2417bb4c147e2334b70ec Mon Sep 17 00:00:00 2001 From: Adam Yeats Date: Tue, 29 Oct 2024 18:53:43 +0000 Subject: [PATCH] Add compatibility warning for SurrealDB v2.0 --- .github/workflows/e2e.yml | 6 +++++- README.md | 4 ++++ src/components/ConfigEditor.tsx | 20 +++++++++++++++++--- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 46b132ee..20e9a808 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -71,5 +71,9 @@ jobs: retention-days: 30 strategy: matrix: - surreal-version: ['latest', '1.5.4'] + surreal-version: [ + # TODO: re-enable this step when the 2.0 is supported + # 'latest', + '1.5.4', + ] timeout-minutes: 60 diff --git a/README.md b/README.md index b1f3c1eb..5f388670 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ The SurrealDB datasource plugin enables you to query and visualize SurrealDB data directly within Grafana, offering seamless integration and exploration of SurrealDB datasets. +## ⚠️ SurrealDB v2.0 compatibility + +**Important:** The Grafana SurrealDB datasource currently does not support SurrealDB v2.0. Please ensure you are using a compatible version of SurrealDB (v1.x) for full functionality. Follow the GitHub issue [here](https://github.com/grafana/surrealdb-datasource/issues/441) for updates on compatibility. + ## ⚠️ This plugin is currently experimental This means that while we believe in its potential and are enthusiastic about its development, **we are not yet ready to make a long-term commitment to maintaining it indefinitely**. The plugin is still under active development and may contain bugs. We do not recommend using this plugin in production environments. diff --git a/src/components/ConfigEditor.tsx b/src/components/ConfigEditor.tsx index 47c237d5..8aa838c4 100644 --- a/src/components/ConfigEditor.tsx +++ b/src/components/ConfigEditor.tsx @@ -1,5 +1,5 @@ import React, { ChangeEvent } from 'react'; -import { Alert, Divider, Field, Input, SecretInput, TextLink, VerticalGroup } from '@grafana/ui'; +import { Alert, Divider, Field, Input, SecretInput, Stack, TextLink } from '@grafana/ui'; import { DataSourceDescription, ConfigSection } from '@grafana/experimental'; import { DataSourcePluginOptionsEditorProps } from '@grafana/data'; import type { SurrealDataSourceOptions, SurrealSecureJsonData } from '../types'; @@ -87,8 +87,21 @@ export function ConfigEditor({ onOptionsChange, options }: Props) { hasRequiredFields /> + + +
+ The Grafana SurrealDB datasource currently does not support SurrealDB v2.0. Please ensure you are using a + compatible version of SurrealDB (v1.x) for full functionality. Follow the GitHub issue{' '} + + here + {' '} + for updates on compatibility. +
+
+
+ - +
This means that you might encounter unexpected behavior, bugs, or limitations while using this datasource. We strongly advise exercising caution and understanding the potential risks associated with using @@ -101,8 +114,9 @@ export function ConfigEditor({ onOptionsChange, options }: Props) { !
-
+
+