Skip to content
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

[Improvement][Alert] Add timeout params for HTTP plugin #15174

Merged
merged 3 commits into from
Nov 18, 2023

Conversation

qingwli
Copy link
Member

@qingwli qingwli commented Nov 16, 2023

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (36f7205) 38.23% compared to head (06ffb9e) 38.24%.

❗ Current head 06ffb9e differs from pull request most recent head 2847675. Consider uploading reports for the commit 2847675 to get more accurate results

Files Patch % Lines
...dolphinscheduler/plugin/alert/http/HttpSender.java 18.18% 8 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##                dev   #15174   +/-   ##
=========================================
  Coverage     38.23%   38.24%           
- Complexity     4695     4696    +1     
=========================================
  Files          1285     1285           
  Lines         45454    45471   +17     
  Branches       4951     4952    +1     
=========================================
+ Hits          17381    17391   +10     
- Misses        26181    26188    +7     
  Partials       1892     1892           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qingwli qingwli self-assigned this Nov 17, 2023
@qingwli qingwli added this to the 3.3.0 milestone Nov 17, 2023
@github-actions github-actions bot added the UI ui and front end related label Nov 17, 2023
@qingwli qingwli changed the title [Improvement][Alert] Add timeout params for alert HTTP request [Improvement][Alert] Add timeout params for HTTP plugin Nov 17, 2023
@@ -73,6 +75,9 @@
bodyParams = paramsMap.get(HttpAlertConstants.NAME_BODY_PARAMS);
contentField = paramsMap.get(HttpAlertConstants.NAME_CONTENT_FIELD);
requestType = paramsMap.get(HttpAlertConstants.NAME_REQUEST_TYPE);
timeout = StringUtils.isNotBlank(paramsMap.get(HttpAlertConstants.NAME_TIMEOUT))
? Integer.parseInt(paramsMap.get(HttpAlertConstants.NAME_TIMEOUT))

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.
Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

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

LGTM

@ruanwenjun ruanwenjun added the improvement make more easy to user or prompt friendly label Nov 17, 2023
Copy link

sonarcloud bot commented Nov 18, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

57.1% 57.1% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@ruanwenjun ruanwenjun merged commit a158f14 into apache:dev Nov 18, 2023
54 of 55 checks passed
@qingwli qingwli deleted the alert-add-timeout branch November 20, 2023 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend improvement make more easy to user or prompt friendly ready-to-merge UI ui and front end related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement][Alert] Add timeout params for HTTP plugin
3 participants