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

[Feature/extensions] Create Detector Workflow #692

Merged

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Oct 13, 2022

Description

This is an initial draft PR for create detector workflow.

  1. When creating an index and having the method markMappingUpToDate which requires an actionListener. I have passed it as null for now but we need to figure out a way for this mapping. Or do we even need a listener because we can get the Response directly while creating the AD_Index from SDKClient.
  2. Need to wait for createComponent integration to finish so that we will get an object for AnomalyDetectionIndices to call markMappingUpToDate
  3. Not able to start AD Extension because while creating the handler I'm passing null for settings and clusterService
    handler = List.of(new RestCreateDetectorAction(null, null)); as these objects will be available through createComponent

This PR adds:

  1. Create Detector workflow for AD Extension
  2. Migrate client transports to Apache HttpClient / Core 5.x

Issues Resolved

opensearch-project/opensearch-sdk-java#58

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.

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
@owaiskazi19 owaiskazi19 requested a review from dbwiddis October 13, 2022 20:18
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
@owaiskazi19 owaiskazi19 marked this pull request as ready for review November 4, 2022 22:49
@owaiskazi19 owaiskazi19 requested review from a team and dbwiddis November 4, 2022 22:49
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2022

Codecov Report

Merging #692 (258faea) into feature/extensions (11d094a) will decrease coverage by 0.43%.
The diff coverage is 0.00%.

❗ Current head 258faea differs from pull request most recent head 2ee1a1e. Consider uploading reports for the commit 2ee1a1e to get more accurate results

Impacted file tree graph

@@                   Coverage Diff                    @@
##             feature/extensions     #692      +/-   ##
========================================================
- Coverage                 53.81%   53.37%   -0.44%     
  Complexity                 2679     2679              
========================================================
  Files                       288      290       +2     
  Lines                     16004    16134     +130     
  Branches                   1703     1706       +3     
========================================================
  Hits                       8612     8612              
- Misses                     6767     6897     +130     
  Partials                    625      625              
Flag Coverage Δ
plugin 53.37% <0.00%> (-0.44%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...va/org/opensearch/ad/AnomalyDetectorExtension.java 0.00% <0.00%> (ø)
...main/java/org/opensearch/ad/auth/UserIdentity.java 54.78% <ø> (ø)
.../java/org/opensearch/ad/model/AnomalyDetector.java 90.00% <ø> (ø)
...g/opensearch/ad/rest/RestCreateDetectorAction.java 0.00% <0.00%> (ø)
...ensearch/ad/transport/ADCancelTaskNodeRequest.java 34.78% <ø> (ø)
...rg/opensearch/ad/transport/ADStatsNodeRequest.java 100.00% <ø> (ø)
...nsearch/ad/transport/ADTaskProfileNodeRequest.java 0.00% <ø> (ø)
...a/org/opensearch/ad/transport/CronNodeRequest.java 100.00% <ø> (ø)
...pensearch/ad/transport/DeleteModelNodeRequest.java 90.90% <ø> (ø)
...rg/opensearch/ad/transport/ProfileNodeRequest.java 91.66% <ø> (ø)
... and 3 more

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

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

LGTM! Great job! A few comments (can be resolved to merge).

@owaiskazi19 owaiskazi19 requested a review from joshpalis November 7, 2022 21:22
@owaiskazi19 owaiskazi19 requested a review from ryanbogan November 7, 2022 21:22
@owaiskazi19 owaiskazi19 merged commit 5fdb72a into opensearch-project:feature/extensions Nov 7, 2022
@dbwiddis dbwiddis changed the title Create Detector Workflow [Feature/extensions] Create Detector Workflow Nov 12, 2022
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.

4 participants