Skip to content

[FEATURE] Add OpenGemini plugin#530

Open
aviralgarg05 wants to merge 7 commits intoperses:mainfrom
aviralgarg05:feat/opengemini-plugin
Open

[FEATURE] Add OpenGemini plugin#530
aviralgarg05 wants to merge 7 commits intoperses:mainfrom
aviralgarg05:feat/opengemini-plugin

Conversation

@aviralgarg05
Copy link

[FEATURE] Add OpenGemini plugin

This PR adds support for OpenGemini, a CNCF sandbox project for distributed time-series data storage. Since OpenGemini is fully compatible with InfluxDB v1.x APIs, this plugin implements the necessary data models and components to connect to OpenGemini instances and execute InfluxQL queries.

Plugins Included:

  • OpenGeminiDatasource: Datasource plugin for connecting to OpenGemini instances with support for direct URL and HTTP proxy settings.
  • OpenGeminiTimeSeriesQuery: Time series query plugin using InfluxQL with support for database selection and variable substitution.

Relates to perses/perses#3716

Description

The plugin is implemented as a new package within the perses/plugins monorepo. Key features include:

  • Schema-first Design: CUE schemas define the OpenGeminiDatasource and OpenGeminiTimeSeriesQuery specs, ensuring full validation.
  • InfluxDB Compatibility: Uses the /query endpoint and handles Influx-style JSON response transformation (columns/values) into Perses TimeSeries format.
  • Editor UI: React-based editors for configuring connection settings and writing InfluxQL queries.
  • Monorepo Integration: Fully integrated with the root turbo build system and rsbuild.shared configuration.

Screenshots

N/A - Uses standard Perses form and editor UI components.

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [FEATURE] Add OpenGemini plugin naming convention.
  • All commits have DCO signoffs.

UI Changes

  • Code follows the UI guidelines.
  • Verified local build successfully using npx turbo run build --filter=@perses-dev/opengemini-plugin.

This adds support for OpenGemini, a CNCF sandbox project for time-series data storage that is compatible with InfluxDB v1.x APIs.

Plugins included:
- OpenGeminiDatasource: Datasource plugin for connecting to OpenGemini instances
- OpenGeminiTimeSeriesQuery: Time series query plugin using InfluxQL

Relates to perses/perses#3716

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
@aviralgarg05 aviralgarg05 requested review from a team and AntoineThebaud as code owners January 20, 2026 12:08
@aviralgarg05 aviralgarg05 requested review from shahrokni and removed request for a team January 20, 2026 12:08
@jgbernalp
Copy link
Contributor

@aviralgarg05 you need to execute npm install from the root of the project after adding a plugin so the package-lock.json is on sync.

This commit addresses the following:

- Adds missing lint script to package.json

- Fixes linting errors in source code

- Adds Jest configuration and setup files

- Adds basic unit test to satisfy test runner

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
- Add missing license header to datasource.test.ts
- Update golangci-lint script to skip plugins without Go files (opengemini is TypeScript-only)

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
@aviralgarg05 aviralgarg05 force-pushed the feat/opengemini-plugin branch from 29f8944 to ebf3d1e Compare January 23, 2026 12:41
Copy link
Contributor

@AntoineThebaud AntoineThebaud left a comment

Choose a reason for hiding this comment

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

CUE review following a change on main branch:

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>

# Conflicts:
#	package-lock.json
@aviralgarg05 aviralgarg05 force-pushed the feat/opengemini-plugin branch from a677176 to 4a6a3f6 Compare February 4, 2026 08:52
- Add Apache 2.0 license headers to CUE schema files
- Fix #selector to use _kind: #kind pattern instead of hardcoded kind field
- Resolves schema validation error and license check failures

Signed-off-by: Aviral Garg <waysorted@gmail.com>
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
@aviralgarg05 aviralgarg05 force-pushed the feat/opengemini-plugin branch from 019dbd8 to 2a563a5 Compare February 9, 2026 12:49
Copy link
Member

@Nexucis Nexucis left a comment

Choose a reason for hiding this comment

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

thank you @aviralgarg05 for your contribution.

Here few comments to improve the implementation.

@@ -0,0 +1,15 @@
runtimes:
Copy link
Member

Choose a reason for hiding this comment

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

we are not using codacy, can you remove the relative file please ?


for _, workspace := range npm.MustGetWorkspaces(".") {
// Skip workspaces without Go files
if !hasGoFiles(workspace) {
Copy link
Member

Choose a reason for hiding this comment

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

can you remove these lines ? go-sdk will be necessary for plugin with schema.

You have multiple example about go implementation for datasource, you can follow them. Thank you by advance

"@emotion/react": "^11.7.1",
"@emotion/styled": "^11.6.0",
"@mui/material": "^6.1.10",
"@perses-dev/components": "^0.53.0-rc.1",
Copy link
Member

Choose a reason for hiding this comment

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

we have updated the @persesdev dependencies, can you do the same please ?

@@ -0,0 +1,6 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

if you want to tests you schema, this file will need to go in the folder opengimini/schemas/datasource/tests/valid/

// See the License for the specific language governing permissions and
// limitations under the License.

export * from './opengemini-datasource';
Copy link
Member

Choose a reason for hiding this comment

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

I don't get why you need to create a sub folder opengimini-datasource. The root folder datasource should be enough right ?

@@ -0,0 +1,29 @@
// Copyright The Perses Authors
Copy link
Member

Choose a reason for hiding this comment

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

I believe you simplify the folders here. You could just have the following folder openginimi/schemas/datasource/opengemini.cue

I don't think you will define other datasource right ?

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.

4 participants