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

make threat intel async #703

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Conversation

sbcd90
Copy link
Collaborator

@sbcd90 sbcd90 commented Oct 31, 2023

Description

this pr changes the logic of threat intel implementation to use listeners and removes blocking Future.actionGet() calls from the code which fails test validations.

Issues Resolved

[List any issues this PR will resolve]

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

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: Subhobrata Dey <[email protected]>
@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #703 (1cdd62a) into main (7a45203) will decrease coverage by 1.82%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               main     #703      +/-   ##
============================================
- Coverage     26.99%   25.18%   -1.82%     
+ Complexity     1068     1021      -47     
============================================
  Files           274      275       +1     
  Lines         12352    12458     +106     
  Branches       1343     1361      +18     
============================================
- Hits           3334     3137     -197     
- Misses         8745     9053     +308     
+ Partials        273      268       -5     
Files Coverage Δ
...lytics/threatIntel/DetectorThreatIntelService.java 7.05% <ø> (+0.60%) ⬆️
...threatIntel/action/ThreatIntelIndicesResponse.java 0.00% <0.00%> (ø)
...s/threatIntel/action/TransportPutTIFJobAction.java 0.00% <0.00%> (-79.69%) ⬇️
...alytics/threatIntel/jobscheduler/TIFJobRunner.java 0.00% <0.00%> (-75.41%) ⬇️
...reatIntel/jobscheduler/TIFJobParameterService.java 1.28% <0.00%> (-87.61%) ⬇️
...lytics/threatIntel/ThreatIntelFeedDataService.java 3.97% <0.00%> (-0.99%) ⬇️
.../threatIntel/jobscheduler/TIFJobUpdateService.java 0.81% <0.00%> (-27.23%) ⬇️
...lytics/transport/TransportIndexDetectorAction.java 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

@eirsep eirsep merged commit 0dd9787 into opensearch-project:main Oct 31, 2023
11 of 15 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Subhobrata Dey <[email protected]>
(cherry picked from commit 0dd9787)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Subhobrata Dey <[email protected]>
(cherry picked from commit 0dd9787)
eirsep pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Subhobrata Dey <[email protected]>
(cherry picked from commit 0dd9787)

Co-authored-by: Subhobrata Dey <[email protected]>
createThreatIntelFeedData();
tifdIndex = getLatestIndexByCreationDate();
createThreatIntelFeedData(listener);
} else {
Copy link

@muralikpbhat muralikpbhat Oct 31, 2023

Choose a reason for hiding this comment

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

Why this should be in else? Dont we need to do even when tifIndex was null and after it is populated in if?

Copy link
Member

Choose a reason for hiding this comment

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

similar search request has been made in the createThreatIntelFeedData() method once the index creation is done.

sbcd90 pushed a commit that referenced this pull request Oct 31, 2023
jowg-amazon added a commit to jowg-amazon/security-analytics that referenced this pull request Nov 8, 2023
jowg-amazon added a commit to jowg-amazon/security-analytics that referenced this pull request Nov 8, 2023
jowg-amazon added a commit to jowg-amazon/security-analytics that referenced this pull request Nov 8, 2023
AWSHurneyt pushed a commit that referenced this pull request Nov 8, 2023
* Revert "make threat intel async (#703) (#704)"

This reverts commit 5b4ab6c.

Signed-off-by: Joanne Wang <[email protected]>

* Revert "Integrate threat intel feeds (#669) (#690)"

This reverts commit 559d97e.

Signed-off-by: Joanne Wang <[email protected]>

---------

Signed-off-by: Joanne Wang <[email protected]>
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.

4 participants