You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/03/01 10:01:59 UTC

[GitHub] [dolphinscheduler] liqingwang commented on issue #7992: [Feature][Alert] Support PagerDuty Plugin && Alert module judging strategy

liqingwang commented on issue #7992:
URL: https://github.com/apache/dolphinscheduler/issues/7992#issuecomment-1055248746


   Hi All.
   
   I have finished the code and the design needs to be changed a bit.
   
   #### 1. Add warning_type in t_ds_alert table
   
   ```sql
   ALTER TABLE `t_ds_alert` ADD COLUMN `warning_type` tinyint(4) DEFAULT '2' COMMENT '1 process is successfully, 2 process/task is failed';
   ```
   
   Save the warning type when the alert is triggered.  And the default value is 2.
   
   The reason why use warning_type because of we have this enum warning_type in the code, and we don't need to create the new enum.
   
   And in the future when we want to add new alert situation we just needs to change one place code.
   
   #### 2. Don't need to add column in t_ds_alert_plugin_instance table
   
   I add a new input param named `warningType` in AlertPluginManager class. And installPlugin function will add this params to all plugins. 
   
   Has three choice, success fail all. The default value is all.
   
   The judging strategy is same as above, when the plugin params has no `warningType` field and the default value is all  to compatible with historical logic.
   
   
   
   And I merged Plan 2 Save the alert strategy when triggered & Plan 3 Change the login to match strategy.
   
   Please to be reviewed.  #8636


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