Skip to content

Pipe Plugin: Only Allow Create Model Compatible Plugins - #15227

Merged
SteveYurongSu merged 1 commit into
masterfrom
create-pipe-plugin-res
Mar 28, 2025
Merged

Pipe Plugin: Only Allow Create Model Compatible Plugins#15227
SteveYurongSu merged 1 commit into
masterfrom
create-pipe-plugin-res

Conversation

@SteveYurongSu

Copy link
Copy Markdown
Member

No description provided.

@SteveYurongSuSteveYurongSu self-assigned this Mar 28, 2025

CopilotAI 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.

Pull Request Overview

This PR introduces a model compatibility check for Pipe Plugin creation by adding a new boolean field to track whether a plugin is designed for table model usage. Key changes include:

  • Adding an "isTableModel" field and associated accessor methods in CreatePipePluginStatement.
  • Setting the "isTableModel" flag appropriately in two constructor overloads in CreatePipePluginTask.
  • Enhancing the plugin class loading process in ClusterConfigTaskExecutor by checking model compatibility and adjusting error messages accordingly.

Reviewed Changes

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

FileDescription
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/pipe/CreatePipePluginStatement.javaIntroduces and manages the isTableModel flag
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/CreatePipePluginTask.javaSets isTableModel flag based on the constructor used
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.javaUses isTableModel with VisibilityUtils to verify plugin compatibility and update error reporting
Comments suppressed due to low confidence (1)

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java:979

  • [nitpick] The use of the isTableModel boolean to determine whether to display 'table' or 'tree' in the error message may lead to ambiguity in understanding the plugin type. Consider renaming the flag to something more descriptive (e.g., 'designedForTableModel') or clarifying the message to explicitly state 'table model' vs 'non-table model'.
LOGGER.warn(
"Failed to create PipePlugin({}) because this plugin is not designed for {} model.",
createPipePluginStatement.getPluginName(),
isTableModel ? "table" : "tree");

@sonarqubecloud

Copy link
Copy Markdown

@SteveYurongSu
SteveYurongSu merged commit 08c2963 into masterMar 28, 2025
@SteveYurongSu
SteveYurongSu deleted the create-pipe-plugin-res branch March 28, 2025 10:42
@codecov

codecovBot commented Mar 28, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.

Project coverage is 39.32%. Comparing base (3d1cd0e) to head (d393dfd).
Report is 7 commits behind head on master.

Files with missing linesPatch %Lines
...ion/config/executor/ClusterConfigTaskExecutor.java0.00%11 Missing ⚠️
...ement/metadata/pipe/CreatePipePluginStatement.java0.00%4 Missing ⚠️
...xecution/config/metadata/CreatePipePluginTask.java0.00%2 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #15227 +/- ##
============================================
- Coverage 39.36% 39.32% -0.04% 
Complexity 193 193 ============================================
Files 4623 4624 +1 Lines 297495 297576 +81 Branches 37133 37135 +2 ============================================
- Hits 117097 117024 -73 - Misses 180398 180552 +154 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

JackieTien97 pushed a commit that referenced this pull request Apr 14, 2025
Sign up for freeto 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.

3 participants

@SteveYurongSu@VGalaxies