-
Notifications
You must be signed in to change notification settings - Fork 641
[ISSUE #4411] Add DingDing sink connector. #4557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # settings.gradle
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #4557 +/- ##
============================================
+ Coverage 16.62% 16.80% +0.17%
- Complexity 1603 1626 +23
============================================
Files 743 749 +6
Lines 28575 28683 +108
Branches 2479 2487 +8
============================================
+ Hits 4752 4821 +69
- Misses 23372 23408 +36
- Partials 451 454 +3 ☔ View full report in Codecov by Sentry. |
...va/org/apache/eventmesh/openconnect/offsetmgmt/api/constants/ConnectRecordExtensionKeys.java
Show resolved
Hide resolved
.../main/java/org/apache/eventmesh/connector/dingding/sink/connector/DingDingSinkConnector.java
Outdated
Show resolved
Hide resolved
...t/java/org/apache/eventmesh/connector/dingding/sink/connector/DingDingSinkConnectorTest.java
Outdated
Show resolved
Hide resolved
.../main/java/org/apache/eventmesh/connector/dingding/sink/connector/DingDingSinkConnector.java
Show resolved
Hide resolved
.../main/java/org/apache/eventmesh/connector/dingding/sink/connector/DingDingSinkConnector.java
Outdated
Show resolved
Hide resolved
| .orElse("EventMesh-Message"); | ||
| contentMap.put("title", title); | ||
| contentMap.put("text", String.valueOf(record.getData())); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For other illegal ConnectRecord, could you report an error or output logs to continue directly? Now it's sending an empty Map to DingDing.
对于其他不合法的ConnectRecord,这里是不是可以报错或者输出日志直接continue?现在是给钉钉发送空的Map。
| .orElse("EventMesh-Message"); | ||
| contentMap.put("title", title); | ||
| contentMap.put("text", String.valueOf(record.getData())); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I mean is that when the DingDingMessageTemplateType in ConnectRecord is illegal, the contentMap sent to DingTalk is empty. Do you need to handle it? Error reported or ignored after logging.
我的意思是当ConnectRecord中DingDingMessageTemplateType不合法,这时给钉钉发了空的contentMap。需不需要处理下?报错或者打日志后忽略。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to deal with it, the enumeration class itself will throw an exception when illegal type.
不用处理,枚举类内部遇到不合法的类型本身会抛异常。
* Add dingding sink connector. * fix: Remove unused config. * fix: Remove unused config. * fix: review * Add example config. * fix: review * fix: continue when record data is null.
Fixes #4411 .
Modifications
Sample image (Plain text):

Sample image (Markdown text):

dingding doc: https://open.dingtalk.com/document/orgapp/the-robot-sends-a-group-message
发送样例图 (纯文本消息):

发送样例图 (Markdown消息):

文档参考: https://open.dingtalk.com/document/orgapp/the-robot-sends-a-group-message