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

Add custom result index lifecycle management condition fields to config #1215

Merged
merged 4 commits into from
Jun 3, 2024

Conversation

jackiehanyang
Copy link
Collaborator

Description

Add custom result index lifecycle management condition fields to config

Issues Resolved

#1213

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: Jackie Han <[email protected]>
@@ -268,14 +277,23 @@ public AnomalyDetector(StreamInput input) throws IOException {
if (input.readBoolean()) {
this.rules = input.readList(Rule::new);
}
if (input.readBoolean()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use readOptionalInt now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch! forgot to update this part

@@ -294,6 +306,21 @@ public Config(StreamInput input) throws IOException {
this.recencyEmphasis = input.readInt();
this.seasonIntervals = input.readInt();
this.historyIntervals = input.readInt();
if (input.readBoolean()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use readOptionalInt now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

Copy link

codecov bot commented May 31, 2024

Codecov Report

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

Project coverage is 71.69%. Comparing base (49b121f) to head (21c595d).
Report is 2 commits behind head on main.

Current head 21c595d differs from pull request most recent head e315f0f

Please upload reports for the commit e315f0f to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1215      +/-   ##
============================================
- Coverage     80.39%   71.69%   -8.70%     
- Complexity     4589     4844     +255     
============================================
  Files           336      517     +181     
  Lines         19118    22731    +3613     
  Branches       1993     2248     +255     
============================================
+ Hits          15369    16296     +927     
- Misses         2796     5407    +2611     
- Partials        953     1028      +75     
Flag Coverage Δ
plugin 71.69% <58.62%> (-8.70%) ⬇️

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

Files Coverage Δ
src/main/java/org/opensearch/ad/model/ADTask.java 97.99% <100.00%> (+0.05%) ⬆️
...va/org/opensearch/forecast/model/ForecastTask.java 97.58% <100.00%> (+0.05%) ⬆️
.../java/org/opensearch/ad/model/AnomalyDetector.java 85.49% <73.33%> (-2.01%) ⬇️
.../handler/AbstractAnomalyDetectorActionHandler.java 20.00% <0.00%> (-41.85%) ⬇️
.../rest/handler/AbstractForecasterActionHandler.java 0.00% <0.00%> (ø)
...java/org/opensearch/forecast/model/Forecaster.java 66.26% <33.33%> (-6.20%) ⬇️
...n/java/org/opensearch/timeseries/model/Config.java 85.05% <66.66%> (-5.72%) ⬇️

... and 276 files with indirect coverage changes

kaituo
kaituo previously approved these changes May 31, 2024
Signed-off-by: Jackie Han <[email protected]>
@jackiehanyang jackiehanyang merged commit 05b04b9 into opensearch-project:main Jun 3, 2024
25 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 3, 2024
…ig (#1215)

* Add custom result index lifecycle management condition fields to config

Signed-off-by: Jackie Han <[email protected]>

* add more tests

Signed-off-by: Jackie Han <[email protected]>

* utilizing readOptionalInt() method when reading nullable value

Signed-off-by: Jackie Han <[email protected]>

* add more tests

Signed-off-by: Jackie Han <[email protected]>

---------

Signed-off-by: Jackie Han <[email protected]>
(cherry picked from commit 05b04b9)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
jackiehanyang pushed a commit that referenced this pull request Jun 4, 2024
…ig (#1215) (#1216)

* Add custom result index lifecycle management condition fields to config



* add more tests



* utilizing readOptionalInt() method when reading nullable value



* add more tests



---------


(cherry picked from commit 05b04b9)

Signed-off-by: Jackie Han <[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>
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