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

[Bug] [Alert] AlertSendStatus doesn't make any sense. #16820

Closed
3 tasks done
toujours33 opened this issue Nov 19, 2024 · 3 comments · Fixed by #16824
Closed
3 tasks done

[Bug] [Alert] AlertSendStatus doesn't make any sense. #16820

toujours33 opened this issue Nov 19, 2024 · 3 comments · Fixed by #16824
Assignees
Labels
3.3.0 bug Something isn't working

Comments

@toujours33
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

After alert sent, the AlertStatus keep PartialSuccess whenever the alert behavior was.

long failureCount = alertSendStatuses.stream()
.map(alertSendStatus -> alertSendStatus.getSendStatus() == AlertStatus.EXECUTION_FAILURE)
.count();
long successCount = alertSendStatuses.stream()
.map(alertSendStatus -> alertSendStatus.getSendStatus() == AlertStatus.EXECUTION_SUCCESS)
.count();

failureCount or successCount are consistent for map function change AlertSendStatus stream to Boolean stream.

What you expected to happen

The failureCount and successCount must count correctly

How to reproduce

  1. Configure a alert instance and alert group
  2. Create a process
  3. Trigger the process by set Notification Strategy with All and Alarm Group in 1st step
  4. Fetch records in table t_ds_alert, you can see alert_status column all in value 3, which means PartialSuccess.

Anything else

No response

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@toujours33 toujours33 added bug Something isn't working Waiting for reply Waiting for reply labels Nov 19, 2024
@toujours33 toujours33 changed the title [Bug] [Alert] AbstractEventSender send event status doesn't make any sense [Bug] [Alert] AlertSendStatus doesn't make any sense. Nov 19, 2024
@ruanwenjun
Copy link
Member

We should use filter here

@ruanwenjun ruanwenjun added 3.3.0 and removed Waiting for reply Waiting for reply labels Nov 19, 2024
@toujours33
Copy link
Contributor Author

We should use filter here

Yes, I will fix this issue, and will also consider adding some unit tests to cover this issue

@ruanwenjun
Copy link
Member

We should use filter here

Yes, I will fix this issue, and will also consider adding some unit tests to cover this issue

Thanks, assigned to you, it's better to add integration test case for AlertServer, I create a new issue to track #16823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.3.0 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants