Skip to content

Conversation

@fengys1996
Copy link
Contributor

@fengys1996 fengys1996 commented Nov 14, 2025

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

This pr mainly change

  1. Added a constant value INFORMATION_SCHEMA_ALERTS_TABLE_ID.
  2. Removed #[cfg(feature = "enterprise")] from InformationSchemaTableFactory related.
  3. Added extension field for GreptimeOptions struct which stores some configuration related to extensions. The usage detail see test_read_config_file_with_extension.
  4. Added Extension struct for flownode, frontend, standalone etc, which make extensions strongly typed.
  5. Also remove the components field of the Flownode and Standalone instances, which breaks encapsulation.

PR Checklist

Please convert it to a draft if some of the following conditions are not met.

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.
  • API changes are backward compatible.
  • Schema or data changes are backward compatible.

@github-actions github-actions bot added size/M docs-not-required This change does not impact docs. labels Nov 14, 2025
@fengys1996 fengys1996 requested a review from Copilot November 14, 2025 08:04
Copilot finished reviewing on behalf of fengys1996 November 14, 2025 08:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces an enhanced extension mechanism to support enterprise features in a more flexible way. The changes replace the previous plugin-based approach with a factory-based extension system that allows for better separation between open-source and enterprise code.

  • Adds a new Extension type parameterization to GreptimeOptions for custom extension support
  • Replaces plugin-based trigger DDL manager initialization with a factory-based approach
  • Removes enterprise feature flag requirements from catalog information schema tables

Reviewed Changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/cmd/src/options.rs Adds generic extension parameter E to GreptimeOptions and introduces EmptyOptions for non-enterprise builds
src/cmd/src/extension/*.rs New extension module with factory traits for standalone, frontend, and metasrv components
src/meta-srv/src/metasrv/builder.rs Updates builder to accept and use extension for trigger DDL manager creation
src/meta-srv/src/bootstrap/*.rs Adds extension module and updates metasrv_builder signature to accept extension
src/common/meta/src/ddl_manager.rs Renames method from with_trigger_ddl_manager to with_trigger_ddl_manager_opt
src/cmd/src/standalone.rs Updates to use extension-based factory for trigger DDL manager and information schema tables
src/cmd/src/frontend.rs Updates to use extension-based factory for information schema tables
src/cmd/src/metasrv.rs Adds extension parameter to build methods
src/cmd/src/flownode.rs Removes enterprise Components struct (no longer needed)
src/cmd/src/datanode.rs Adds extension generic parameter to types and methods
src/catalog/src/*.rs Removes enterprise feature flags from information schema table factory support
src/cmd/tests/load_config_test.rs Updates test code to use EmptyOptions generic parameter
src/cmd/Cargo.toml Removes catalog/enterprise from enterprise feature dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fengys1996 fengys1996 requested a review from Copilot November 17, 2025 12:08
Copilot finished reviewing on behalf of fengys1996 November 17, 2025 12:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 25 out of 26 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fengys1996 fengys1996 marked this pull request as ready for review November 18, 2025 08:04
@fengys1996 fengys1996 requested review from a team and MichaelScofield as code owners November 18, 2025 08:04
@fengys1996 fengys1996 changed the title chore: enhanced extension feat: enhanced extension Nov 18, 2025
@github-actions github-actions bot added size/L and removed size/M labels Nov 18, 2025
Copilot finished reviewing on behalf of fengys1996 November 18, 2025 10:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 26 out of 28 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MichaelScofield
Copy link
Collaborator

Seems "extension" is functionally overlapping with existed "plugins". Unless there are some hard problems that current plugins can't resolve while extension can, I'm inclined to optimize plugins instead. WDYT @sunng87 @fengjiachun

@sunng87
Copy link
Member

sunng87 commented Nov 20, 2025

Yes, is there any chance we can reuse plugin mechanism, or just use wrapper in downstream repos for this?

@fengys1996 fengys1996 marked this pull request as draft November 22, 2025 02:17
@fengys1996 fengys1996 marked this pull request as ready for review November 24, 2025 08:25
@fengys1996 fengys1996 requested a review from WenyXu as a code owner November 24, 2025 08:25
@fengys1996 fengys1996 requested a review from Copilot November 24, 2025 08:41
Copilot finished reviewing on behalf of fengys1996 November 24, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required This change does not impact docs. size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants