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

Various AD tool improvements; add corresponding IT #117

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Jan 9, 2024

Description

This PR includes several AD tool improvements:

  • handle edge case of missing AD system indices - this is expected when no detectors/results have been created, and we should gracefully handle instead of throwing errors. To process results in a consistent manner, refactored the stringbuilding logic into helper methods in both tools
  • Explicitly set the AD config index in the search detectors tool to mimic REST API logic
  • Fix bug of invalid sort string in search AD results tool
  • Add corresponding IT for both AD tools

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.

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (7a596a0) 81.70% compared to head (4c77cb6) 81.23%.

Files Patch % Lines
...ensearch/agent/tools/SearchAnomalyResultsTool.java 77.27% 5 Missing ⚠️
...search/agent/tools/SearchAnomalyDetectorsTool.java 77.77% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #117      +/-   ##
============================================
- Coverage     81.70%   81.23%   -0.48%     
- Complexity      190      193       +3     
============================================
  Files            13       13              
  Lines           962      975      +13     
  Branches        130      130              
============================================
+ Hits            786      792       +6     
- Misses          126      133       +7     
  Partials         50       50              

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

@ohltyler ohltyler changed the title Handle AD tool missing system indices; add corresponding IT Various AD tool improvements; add corresponding IT Jan 9, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
@ohltyler ohltyler marked this pull request as ready for review January 9, 2024 23:55
@ohltyler
Copy link
Member Author

Codecov failure is irrelevant - the added logic there is specifically covered by the added integ tests

@zane-neo zane-neo merged commit cf20a00 into opensearch-project:main Jan 10, 2024
12 of 13 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 10, 2024
* Handle missing system indices; set up IT;

Signed-off-by: Tyler Ohlsen <[email protected]>

* Finish search AD IT; set up search results IT;

Signed-off-by: Tyler Ohlsen <[email protected]>

* Add IT for AD results tool

Signed-off-by: Tyler Ohlsen <[email protected]>

* cleanup

Signed-off-by: Tyler Ohlsen <[email protected]>

---------

Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit cf20a00)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@ohltyler ohltyler deleted the AD-tool-fixes branch January 10, 2024 16:50
ohltyler pushed a commit to ohltyler/skills that referenced this pull request Jan 10, 2024
…t#117)

* Handle missing system indices; set up IT;

Signed-off-by: Tyler Ohlsen <[email protected]>

* Finish search AD IT; set up search results IT;

Signed-off-by: Tyler Ohlsen <[email protected]>

* Add IT for AD results tool

Signed-off-by: Tyler Ohlsen <[email protected]>

* cleanup

Signed-off-by: Tyler Ohlsen <[email protected]>

---------

Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit cf20a00)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ohltyler added a commit that referenced this pull request Jan 10, 2024
…) (#119)

Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
yuye-aws pushed a commit to yuye-aws/skills that referenced this pull request Apr 26, 2024
…ensearch-project#117) (opensearch-project#119)

Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: yuye-aws <[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.

2 participants