-
Notifications
You must be signed in to change notification settings - Fork 114
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
Issue651 tests #1046
Issue651 tests #1046
Conversation
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: Joshua Au <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1046 +/- ##
============================================
+ Coverage 74.49% 74.92% +0.43%
- Complexity 2787 2812 +25
============================================
Files 367 367
Lines 16510 16518 +8
Branches 2358 2362 +4
============================================
+ Hits 12299 12376 +77
+ Misses 2905 2841 -64
+ Partials 1306 1301 -5 ☔ View full report in Codecov by Sentry. |
val indexName2 = "${testIndexName}_filter2" | ||
val indexName3 = "${testIndexName}_filter3" | ||
val policy1 = createRandomPolicy() | ||
val policy2 = createRandomPolicy() // create random policy with actions? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, use specific action to make the failure behavior consistent/predictable
logger.info("Result2: $resp2") | ||
|
||
// change the start time so the job will trigger in 2 seconds. | ||
updateManagedIndexConfigStartTime(getExistingManagedIndexConfig(indexName1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems there's some misunderstanding here. The life of an ISM job is
You create policy, apply to an index, it runs every <> minute by interval.
This updateManagedIndexConfigStartTime is just to help you in the test, so that don't need to wait the full interval. So you call this, then waitFor job running result, then call again, waitFor another running result.
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: Joshua Au <[email protected]>
} | ||
|
||
fun `test explain filter on failed index`() { | ||
val indexName = "${testIndexName}_failed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add another index that not failing
Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: bowenlan-amzn <[email protected]>
@Joshua152 can you fix the check when you got time, thanks |
Signed-off-by: Joshua Au <[email protected]>
Seems we introduce flakyness in explain IT, https://github.com/opensearch-project/index-management/actions/runs/7215557694/job/19660057561?pr=1046, will take another look later |
Signed-off-by: Joshua Au <[email protected]>
* Implemented filtering on the ISM eplain API Signed-off-by: Joshua Au <[email protected]> * Fixed tests for ExplainRequest Signed-off-by: Joshua Au <[email protected]> * Added filtering on query and metadata map Signed-off-by: Joshua Au <[email protected]> * Filtered on indexNames in metadata Signed-off-by: Joshua Au <[email protected]> * Fixed github workflow check errors Signed-off-by: Joshua Au <[email protected]> * Removed debugging comments Signed-off-by: Joshua Au <[email protected]> * Updated code styling to make more clear Signed-off-by: Joshua Au <[email protected]> * Refactored code to match suggestions Signed-off-by: Joshua Au <[email protected]> * Added test case for the ExplainFilter.byMetaData and parse methods Signed-off-by: Joshua Au <[email protected]> * Started implementation of explain filter IT Signed-off-by: Joshua Au <[email protected]> * Implemented test explain filter method Signed-off-by: Joshua Au <[email protected]> * Implemented explain filter test on failure Signed-off-by: Joshua Au <[email protected]> * Cleaned up log statements Signed-off-by: Joshua Au <[email protected]> * Added explain filter test for success Signed-off-by: Joshua Au <[email protected]> * Fixed lint errors Signed-off-by: Joshua Au <[email protected]> * Removed policy from index to fix flaky tests Signed-off-by: Joshua Au <[email protected]> --------- Signed-off-by: Joshua Au <[email protected]> Signed-off-by: bowenlan-amzn <[email protected]> Co-authored-by: bowenlan-amzn <[email protected]>
* Implemented filtering on the ISM eplain API Signed-off-by: Joshua Au <[email protected]> * Fixed tests for ExplainRequest Signed-off-by: Joshua Au <[email protected]> * Added filtering on query and metadata map Signed-off-by: Joshua Au <[email protected]> * Filtered on indexNames in metadata Signed-off-by: Joshua Au <[email protected]> * Fixed github workflow check errors Signed-off-by: Joshua Au <[email protected]> * Removed debugging comments Signed-off-by: Joshua Au <[email protected]> * Updated code styling to make more clear Signed-off-by: Joshua Au <[email protected]> * Refactored code to match suggestions Signed-off-by: Joshua Au <[email protected]> * Added test case for the ExplainFilter.byMetaData and parse methods Signed-off-by: Joshua Au <[email protected]> * Started implementation of explain filter IT Signed-off-by: Joshua Au <[email protected]> * Implemented test explain filter method Signed-off-by: Joshua Au <[email protected]> * Implemented explain filter test on failure Signed-off-by: Joshua Au <[email protected]> * Cleaned up log statements Signed-off-by: Joshua Au <[email protected]> * Added explain filter test for success Signed-off-by: Joshua Au <[email protected]> * Fixed lint errors Signed-off-by: Joshua Au <[email protected]> * Removed policy from index to fix flaky tests Signed-off-by: Joshua Au <[email protected]> --------- Signed-off-by: Joshua Au <[email protected]> Signed-off-by: bowenlan-amzn <[email protected]> Co-authored-by: bowenlan-amzn <[email protected]>
* Backport issue #998 to 2.x Signed-off-by: Joshua Au <[email protected]> * Issue651 tests (#1046) * Implemented filtering on the ISM eplain API Signed-off-by: Joshua Au <[email protected]> * Fixed tests for ExplainRequest Signed-off-by: Joshua Au <[email protected]> * Added filtering on query and metadata map Signed-off-by: Joshua Au <[email protected]> * Filtered on indexNames in metadata Signed-off-by: Joshua Au <[email protected]> * Fixed github workflow check errors Signed-off-by: Joshua Au <[email protected]> * Removed debugging comments Signed-off-by: Joshua Au <[email protected]> * Updated code styling to make more clear Signed-off-by: Joshua Au <[email protected]> * Refactored code to match suggestions Signed-off-by: Joshua Au <[email protected]> * Added test case for the ExplainFilter.byMetaData and parse methods Signed-off-by: Joshua Au <[email protected]> * Started implementation of explain filter IT Signed-off-by: Joshua Au <[email protected]> * Implemented test explain filter method Signed-off-by: Joshua Au <[email protected]> * Implemented explain filter test on failure Signed-off-by: Joshua Au <[email protected]> * Cleaned up log statements Signed-off-by: Joshua Au <[email protected]> * Added explain filter test for success Signed-off-by: Joshua Au <[email protected]> * Fixed lint errors Signed-off-by: Joshua Au <[email protected]> * Removed policy from index to fix flaky tests Signed-off-by: Joshua Au <[email protected]> --------- Signed-off-by: Joshua Au <[email protected]> Signed-off-by: bowenlan-amzn <[email protected]> Co-authored-by: bowenlan-amzn <[email protected]> * Fixed content type import Signed-off-by: Joshua Au <[email protected]> * Implemented filtering on the ISM eplain API (#998) * Implemented filtering on the ISM eplain API Signed-off-by: Joshua Au <[email protected]> * Fixed tests for ExplainRequest Signed-off-by: Joshua Au <[email protected]> * Added filtering on query and metadata map Signed-off-by: Joshua Au <[email protected]> * Filtered on indexNames in metadata Signed-off-by: Joshua Au <[email protected]> * Fixed github workflow check errors Signed-off-by: Joshua Au <[email protected]> * Removed debugging comments Signed-off-by: Joshua Au <[email protected]> * Updated code styling to make more clear Signed-off-by: Joshua Au <[email protected]> * Refactored code to match suggestions Signed-off-by: Joshua Au <[email protected]> --------- Signed-off-by: Joshua Au <[email protected]> Co-authored-by: bowenlan-amzn <[email protected]> * Issue651 tests (#1046) * Implemented filtering on the ISM eplain API Signed-off-by: Joshua Au <[email protected]> * Fixed tests for ExplainRequest Signed-off-by: Joshua Au <[email protected]> * Added filtering on query and metadata map Signed-off-by: Joshua Au <[email protected]> * Filtered on indexNames in metadata Signed-off-by: Joshua Au <[email protected]> * Fixed github workflow check errors Signed-off-by: Joshua Au <[email protected]> * Removed debugging comments Signed-off-by: Joshua Au <[email protected]> * Updated code styling to make more clear Signed-off-by: Joshua Au <[email protected]> * Refactored code to match suggestions Signed-off-by: Joshua Au <[email protected]> * Added test case for the ExplainFilter.byMetaData and parse methods Signed-off-by: Joshua Au <[email protected]> * Started implementation of explain filter IT Signed-off-by: Joshua Au <[email protected]> * Implemented test explain filter method Signed-off-by: Joshua Au <[email protected]> * Implemented explain filter test on failure Signed-off-by: Joshua Au <[email protected]> * Cleaned up log statements Signed-off-by: Joshua Au <[email protected]> * Added explain filter test for success Signed-off-by: Joshua Au <[email protected]> * Fixed lint errors Signed-off-by: Joshua Au <[email protected]> * Removed policy from index to fix flaky tests Signed-off-by: Joshua Au <[email protected]> --------- Signed-off-by: Joshua Au <[email protected]> Signed-off-by: bowenlan-amzn <[email protected]> Co-authored-by: bowenlan-amzn <[email protected]> * Backport explain filter tests * Sleep thread to allow jobs to finish Signed-off-by: Joshua Au <[email protected]> --------- Signed-off-by: Joshua Au <[email protected]> Signed-off-by: bowenlan-amzn <[email protected]> Co-authored-by: bowenlan-amzn <[email protected]>
*Issue #651 : *
Description of changes:
Added test for the byMetadata and parse methods and started implementation for the explain filter integration test.
CheckList:
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.