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

[Plugins] skeleton for events correlation engine plugin #6892

Closed
wants to merge 1 commit into from

Conversation

sbcd90
Copy link
Contributor

@sbcd90 sbcd90 commented Mar 30, 2023

Description

Initial pr for defining skeleton of events correlation engine plugin. RFC is here

Issues Resolved

The 1st issue in the META issue will be resolved.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@sbcd90 sbcd90 changed the title skeleton for events correlation engine plugin [Plugins] skeleton for events correlation engine plugin Mar 30, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@sbcd90
Copy link
Contributor Author

sbcd90 commented Mar 30, 2023

the Gradle check failed due to test failures.

Tests with failures:
 - org.opensearch.snapshots.SearchableSnapshotIT.testCacheFilesAreClosedAfterUse

@nknize @getsaurabh02 kindly have a look.

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.

Thanks @sbcd90 for putting up this frame. Looks a good start to me and added few minor comments.
I see we will have other basic Actions components coming in soon such as to handle Correlation Joins or Correlation Rule Parsing, which we can add in subsequent PRs too.

package org.opensearch.plugin.correlation.core;

public class CorrelationConstants {
public static final String METHOD_PARAMETER_M = "m";
Copy link
Member

Choose a reason for hiding this comment

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

Wondering why is this needed, and can we add java doc to identify the usage here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the variable as this is just the skeleton plugin.


import java.io.IOException;

public class RestSearchCorrelationAction extends BaseRestHandler {
Copy link
Member

Choose a reason for hiding this comment

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

nit : Should it be RestSearchCorrelatedEventsAction to keep it consistent with the related Actions? I am open to both

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed it.


import org.opensearch.action.ActionType;

public class IndexCorrelationRuleAction extends ActionType<IndexCorrelationRuleResponse> {
Copy link
Member

Choose a reason for hiding this comment

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

We will also need to corresponding GetCorrelationRuleAction along with its REST and Transport implementations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add more actions with individual prs.

@getsaurabh02
Copy link
Member

Can we also add some java docs to new Actions especially those bring added at the Transport and Rest layers for developer productivity.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2023

Gradle Check (Jenkins) Run Completed with:

@sbcd90
Copy link
Contributor Author

sbcd90 commented Apr 4, 2023

Can we also add some java docs to new Actions especially those bring added at the Transport and Rest layers for developer productivity.

@getsaurabh02 As this is just the skeleton, i haven't added any Javadoc as there is mostly no logic. will add code & javadoc for it in subsequent prs.

@getsaurabh02
Copy link
Member

Can we also add some java docs to new Actions especially those bring added at the Transport and Rest layers for developer productivity.

@getsaurabh02 As this is just the skeleton, i haven't added any Javadoc as there is mostly no logic. will add code & javadoc for it in subsequent prs.

The skeleton itself can have the java doc stating the intent behind. I am fine if we are planning to add them with the code.

Copy link
Member

@andrross andrross left a comment

Choose a reason for hiding this comment

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

What do you think about moving this to the sandbox while it is under development?

I definitely don't want to stand in the way of incremental development, and I certainly don't expect this whole feature to shipped in a single PR, but I can't really provide a meaningful review of empty classes. Is there no way to structure this such that you're delivering sections of functional and unit tested code in each PR?

@sbcd90
Copy link
Contributor Author

sbcd90 commented Apr 7, 2023

hi @andrross , as we're planning to deliver this plugin for 2.7, so we do not want to move it to sandbox. cc: @getsaurabh02

@sbcd90 sbcd90 closed this Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants