Skip to content

[Improve] Add common protoctl entity check#4084

Open
yuluo-yx wants to merge 5 commits intomasterfrom
0322-yuluo/inprove-add-check-1
Open

[Improve] Add common protoctl entity check#4084
yuluo-yx wants to merge 5 commits intomasterfrom
0322-yuluo/inprove-add-check-1

Conversation

@yuluo-yx
Copy link
Member

No description provided.

Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
@yuluo-yx yuluo-yx force-pushed the 0322-yuluo/inprove-add-check-1 branch from e03579a to 701bfbc Compare March 22, 2026 04:12
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 implements concrete isInvalid() parameter validation for several protocol entities in hertzbeat-common-core (replacing prior TODO placeholders) and adds unit tests to exercise the new validation behavior.

Changes:

  • Implement isInvalid() checks for Websocket, Redfish, Push, JMX, and IPMI protocol entities.
  • Add new JUnit tests covering valid/invalid protocol configurations for those entities.
  • Fix a typo in Protocol interface Javadoc (“vaild” → “valid”).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/WebsocketProtocol.java Adds host/port/path validation logic in isInvalid()
hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/RedfishProtocol.java Adds host/port/credentials/timeout/schema/jsonPath validation logic
hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/PushProtocol.java Adds host/port/uri/fields validation logic
hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/JmxProtocol.java Adds objectName/ssl/auth/url-or-host validation logic
hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/IpmiProtocol.java Adds host/port/credentials/type/raw-field validation logic
hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/Protocol.java Fixes Javadoc typo
hertzbeat-common-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/WebsocketProtocolTest.java Adds tests for websocket protocol validation
hertzbeat-common-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/RedfishProtocolTest.java Adds tests for redfish protocol validation
hertzbeat-common-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/PushProtocolTest.java Adds tests for push protocol validation
hertzbeat-common-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/JmxProtocolTest.java Adds tests for JMX protocol validation
hertzbeat-common-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/IpmiProtocolTest.java Adds tests for IPMI protocol validation

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

yuluo-yx and others added 3 commits March 23, 2026 20:14
…n/entity/job/protocol/WebsocketProtocol.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: shown <jishiwen.jsw@digital-engine.com>
…n/entity/job/protocol/IpmiProtocol.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: shown <jishiwen.jsw@digital-engine.com>
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