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

Adds workflows model and workflow actions for Alerting Plugin #439

Merged
merged 2 commits into from
May 25, 2023

Conversation

eirsep
Copy link
Member

@eirsep eirsep commented May 24, 2023

PRs merged into feature branch feature/composite-monitors:
Added Alerting workflow model (#380)
Renamed chained monitor findings (#390)
Imports fixed (#394)
Added validation on IndexWorkflowRequest class (#405)
Extended deleted workflow response with list of monitor ids failed to delete (#416)

@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #439 (a1760ed) into main (85c9b35) will increase coverage by 0.80%.
The diff coverage is 78.90%.

@@             Coverage Diff              @@
##               main     #439      +/-   ##
============================================
+ Coverage     72.87%   73.67%   +0.80%     
- Complexity      712      804      +92     
============================================
  Files           113      125      +12     
  Lines          4711     5219     +508     
  Branches        606      662      +56     
============================================
+ Hits           3433     3845     +412     
- Misses         1024     1087      +63     
- Partials        254      287      +33     
Impacted Files Coverage Δ
...org/opensearch/commons/alerting/util/IndexUtils.kt 53.33% <ø> (ø)
...search/commons/alerting/AlertingPluginInterface.kt 56.71% <57.14%> (+17.58%) ⬆️
...opensearch/commons/alerting/model/WorkflowInput.kt 57.14% <57.14%> (ø)
...rch/commons/alerting/action/GetWorkflowResponse.kt 57.50% <57.50%> (ø)
...h/commons/alerting/action/IndexWorkflowResponse.kt 70.00% <70.00%> (ø)
...n/org/opensearch/commons/alerting/model/Finding.kt 49.03% <70.83%> (+4.99%) ⬆️
.../commons/alerting/action/DeleteWorkflowResponse.kt 77.27% <77.27%> (ø)
...pensearch/commons/alerting/model/CompositeInput.kt 78.57% <78.57%> (ø)
...h/commons/alerting/model/ChainedMonitorFindings.kt 80.00% <80.00%> (ø)
.../org/opensearch/commons/alerting/model/Workflow.kt 80.74% <80.74%> (ø)
... and 6 more

... and 2 files with indirect coverage changes

lezzago
lezzago previously approved these changes May 24, 2023
Copy link
Member

@getsaurabh02 getsaurabh02 left a comment

Choose a reason for hiding this comment

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

I see three different names being used here in the PR - Workflows, ChainedMonitor and Composite. Wondering if we need to arrive at the consistency in naming, especially when UX and Rest APIs should be using Composite Monitors as the name.

return validationException
}
if (workflow.inputs.size > 1) {
validationException = ValidateActions.addValidationError(
Copy link
Member

Choose a reason for hiding this comment

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

Looks like some of these flows are not covered by the unit test. Consider looking into Codecov comments.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see three different names being used here in the PR - Workflows, ChainedMonitor and Composite. Wondering if we need to arrive at the consistency in naming, especially when UX and Rest APIs should be using Composite Monitors as the name.

Workflow refers to the the new type of scheduled job.
Composite is the input type - it accepts a sequence of monitors to be executed as input.
Chained Monitor refers to chained monitor findings i.e. findings of one monitor are used as the source data for the next monitor which is 'chained' to it.

…arch-project#436)

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
@eirsep eirsep merged commit d088934 into opensearch-project:main May 25, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-439-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d088934defaa749c48022c41eaad5fd61fc84ec3
# Push it to GitHub
git push --set-upstream origin backport/backport-439-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-439-to-2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants