You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "sdhzwc (via GitHub)" <gi...@apache.org> on 2024/08/13 01:55:05 UTC
[PR] [Improvement-16440][Alert] Improvement alert plugin get name [dolphinscheduler]
sdhzwc opened a new pull request, #16441:
URL: https://github.com/apache/dolphinscheduler/pull/16441
<!--Thanks very much for contributing to Apache DolphinScheduler, we are happy that you want to help us improve DolphinScheduler! -->
#16440
## Purpose of the pull request
<!--(For example: This pull request adds checkstyle plugin).-->
## Brief change log
<!--*(for example:)*
- *Add maven-checkstyle-plugin to root pom.xml*
-->
## Verify this pull request
<!--*(Please pick either of the following options)*-->
This pull request is code cleanup without any test coverage.
*(or)*
This pull request is already covered by existing tests, such as *(please describe tests)*.
(or)
This change added tests and can be verified as follows:
<!--*(example:)*
- *Added dolphinscheduler-dao tests for end-to-end.*
- *Added CronUtilsTest to verify the change.*
- *Manually verified the change by testing locally.* -->
(or)
## Pull Request Notice
[Pull Request Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
If your pull request contain incompatible change, you should also add it to `docs/docs/en/guide/upgrede/incompatible.md`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-16440][Alert] Improvement alert plugin get name [dolphinscheduler]
Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS closed pull request #16441: [Improvement-16440][Alert] Improvement alert plugin get name
URL: https://github.com/apache/dolphinscheduler/pull/16441
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-16440][Alert] Improvement alert plugin get name [dolphinscheduler]
Posted by "sdhzwc (via GitHub)" <gi...@apache.org>.
sdhzwc commented on code in PR #16441:
URL: https://github.com/apache/dolphinscheduler/pull/16441#discussion_r1721167279
##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AlertPluginType.java:
##########
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.common.enums;
+
+import static java.util.stream.Collectors.toMap;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+import com.baomidou.mybatisplus.annotation.EnumValue;
+import com.google.common.base.Functions;
+
+public enum AlertPluginType {
+
+ DINGTALK(0, "DingTalk", "ding talk"),
+ EMAIL(1, "Email", "email"),
+ FEISHU(2, "Feishu", "fei shu"),
+ HTTP(3, "Http", "http"),
+ PAGERDUTY(4, "PagerDuty", "pager duty"),
+ PROMETHEUS(5, "Prometheus", "prometheus alert manager"),
+ SCRIPT(6, "Script", "script"),
+ SLACK(7, "Slack", "slack"),
+ TELEGRAM(8, "Telegram", "telegram"),
+ WEBEXTEAMS(9, "WebexTeams", "webex teams"),
+ WECHAT(10, "WeChat", "we chat"),
+ ALIYUNVOICE(11, "AliyunVoice", "aliyun voice");
Review Comment:
> It's better don't add a enum here, otherwise, once we add a new plugin we should modify the enum. We should make the plugin doesn't rely the other module.
Referring to the DbType enumeration, isn't a new data source maintained in the same way?

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-16440][Alert] Improvement alert plugin get name [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on code in PR #16441:
URL: https://github.com/apache/dolphinscheduler/pull/16441#discussion_r1721164544
##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AlertPluginType.java:
##########
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.common.enums;
+
+import static java.util.stream.Collectors.toMap;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+import com.baomidou.mybatisplus.annotation.EnumValue;
+import com.google.common.base.Functions;
+
+public enum AlertPluginType {
+
+ DINGTALK(0, "DingTalk", "ding talk"),
+ EMAIL(1, "Email", "email"),
+ FEISHU(2, "Feishu", "fei shu"),
+ HTTP(3, "Http", "http"),
+ PAGERDUTY(4, "PagerDuty", "pager duty"),
+ PROMETHEUS(5, "Prometheus", "prometheus alert manager"),
+ SCRIPT(6, "Script", "script"),
+ SLACK(7, "Slack", "slack"),
+ TELEGRAM(8, "Telegram", "telegram"),
+ WEBEXTEAMS(9, "WebexTeams", "webex teams"),
+ WECHAT(10, "WeChat", "we chat"),
+ ALIYUNVOICE(11, "AliyunVoice", "aliyun voice");
Review Comment:
It's better don't add a enum here, otherwise, once we add a new plugin we should modify the enum.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-16440][Alert] Improvement alert plugin get name [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on code in PR #16441:
URL: https://github.com/apache/dolphinscheduler/pull/16441#discussion_r1721164544
##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/AlertPluginType.java:
##########
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.common.enums;
+
+import static java.util.stream.Collectors.toMap;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+import com.baomidou.mybatisplus.annotation.EnumValue;
+import com.google.common.base.Functions;
+
+public enum AlertPluginType {
+
+ DINGTALK(0, "DingTalk", "ding talk"),
+ EMAIL(1, "Email", "email"),
+ FEISHU(2, "Feishu", "fei shu"),
+ HTTP(3, "Http", "http"),
+ PAGERDUTY(4, "PagerDuty", "pager duty"),
+ PROMETHEUS(5, "Prometheus", "prometheus alert manager"),
+ SCRIPT(6, "Script", "script"),
+ SLACK(7, "Slack", "slack"),
+ TELEGRAM(8, "Telegram", "telegram"),
+ WEBEXTEAMS(9, "WebexTeams", "webex teams"),
+ WECHAT(10, "WeChat", "we chat"),
+ ALIYUNVOICE(11, "AliyunVoice", "aliyun voice");
Review Comment:
It's better don't add a enum here, otherwise, once we add a new plugin we should modify the enum.
We should make the plugin doesn't rely the other module.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org