Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility warning for SurrealDB v2.0 #442

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
20 changes: 17 additions & 3 deletions src/components/ConfigEditor.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -87,8 +87,21 @@ export function ConfigEditor({ onOptionsChange, options }: Props) {
hasRequiredFields
/>
<Divider />
<Alert title="SurrealDB v2.0 compatibility" severity="warning">
<Stack direction='column'>
<div>
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{' '}
<TextLink href="https://github.com/grafana/surrealdb-datasource/issues/441" external inline>
here
</TextLink>{' '}
for updates on compatibility.
</div>
</Stack>
</Alert>

<Alert title="This datasource is currently experimental" severity="warning">
<VerticalGroup>
<Stack direction='column'>
<div>
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
Expand All @@ -101,8 +114,9 @@ export function ConfigEditor({ onOptionsChange, options }: Props) {
</TextLink>
!
</div>
</VerticalGroup>
</Stack>
</Alert>

<ConfigSection title="Server">
<Field
required
Expand Down