Skip to content

[Backport 2.11] [BUG] ArrayIndexOutOfBoundsException for inconsistent detector index behavior #907

Merged
goyamegh merged 1 commit into2.11from
backport/backport-843-to-2.11
Mar 12, 2024
Merged

[Backport 2.11] [BUG] ArrayIndexOutOfBoundsException for inconsistent detector index behavior #907
goyamegh merged 1 commit into2.11from
backport/backport-843-to-2.11

Conversation

@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

Backport 0ef8543 from #843

…behavior (#843)

* Catch ArrayIndexOutOfBoundsException when detector is missing

Signed-off-by: Megha Goyal <goyamegh@amazon.com>

* Add a check on SearchHits.getHits() length

Signed-off-by: Megha Goyal <goyamegh@amazon.com>

* Remove index out of bounds exception

Signed-off-by: Megha Goyal <goyamegh@amazon.com>

---------

Signed-off-by: Megha Goyal <goyamegh@amazon.com>
(cherry picked from commit 0ef8543)
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 24.71%. Comparing base (aa1a3c9) to head (626c897).

Files Patch % Lines
...ics/transport/TransportCorrelateFindingAction.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               2.11     #907      +/-   ##
============================================
- Coverage     24.71%   24.71%   -0.01%     
  Complexity      947      947              
============================================
  Files           255      255              
  Lines         11353    11354       +1     
  Branches       1280     1280              
============================================
  Hits           2806     2806              
- Misses         8298     8299       +1     
  Partials        249      249              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@goyamegh goyamegh merged commit 35aa656 into 2.11 Mar 12, 2024
@github-actions github-actions bot deleted the backport/backport-843-to-2.11 branch March 12, 2024 00:01
opensearch-trigger-bot bot added a commit that referenced this pull request Mar 14, 2024
…behavior (#843) (#907)

* Catch ArrayIndexOutOfBoundsException when detector is missing

Signed-off-by: Megha Goyal <goyamegh@amazon.com>

* Add a check on SearchHits.getHits() length

Signed-off-by: Megha Goyal <goyamegh@amazon.com>

* Remove index out of bounds exception

Signed-off-by: Megha Goyal <goyamegh@amazon.com>

---------

Signed-off-by: Megha Goyal <goyamegh@amazon.com>
(cherry picked from commit 0ef8543)

Co-authored-by: Megha Goyal <56077967+goyamegh@users.noreply.github.com>
(cherry picked from commit 35aa656)
riysaxen-amzn pushed a commit to riysaxen-amzn/security-analytics that referenced this pull request Mar 25, 2024
…arch-project#907)

Specific "Error Alert" is created for a monitor, when error happens during monitor run. State of alert is ERROR and subsequent errors would upsert this "Error Alert". If error message is different then previous one, errorMessage field would be overwritten and previous error would be added to errorHistory rolling array(10 elements).
---------

Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
(cherry picked from commit 461e95f38bd55268e3ac17026e283ac9f18d911b)
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.

2 participants