Skip to content

Conversation

@yunbow30944
Copy link
Contributor

This pr adds more accurate exceptions for AINode.

Copy link
Contributor

@CRZbulabula CRZbulabula left a comment

Choose a reason for hiding this comment

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

LGTM!

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 a dedicated AINodeConnectionException to replace generic exception handling when connecting to AINode fails, improving exception clarity and consistency across the codebase. It also adds validation to prevent duplicate device IDs in load/unload model operations.

Changes:

  • Created new AINodeConnectionException class with a descriptive error message for AINode connection failures
  • Replaced generic IoTDBRuntimeException and ModelInferenceProcessException with AINodeConnectionException in multiple AINode client interaction points
  • Added duplicate device ID validation in Python handler for load/unload model operations with corresponding error codes (1509, 1510)

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
AINodeConnectionException.java New exception class for AINode connection failures with standardized error message
UDTFForecast.java Replaced generic exception with AINodeConnectionException in forecast method
ForecastTableFunction.java Replaced generic exception with AINodeConnectionException in forecast method and removed unused import
ClassifyTableFunction.java Replaced generic exception with AINodeConnectionException in classify method and removed unused import
ClusterConfigTaskExecutor.java Replaced generic exceptions with AINodeConnectionException in 8 model management methods
InferenceOperator.java Replaced ModelInferenceProcessException with AINodeConnectionException in inference task submission
handler.py Added duplicate device ID validation for loadModel and unloadModel operations
constant.py Added new error codes LOAD_MODEL_ERROR (1509) and UNLOAD_MODEL_ERROR (1510)
AINodeInstanceManagementIT.java Added integration tests for duplicate device ID validation

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

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.

2 participants