-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fix flaky test of visualization tool #2416
Conversation
Signed-off-by: Hailong Cui <ihailong@amazon.com>
plugin/src/test/java/org/opensearch/ml/tools/ToolIntegrationWithLLMTest.java
Outdated
Show resolved
Hide resolved
|
||
@SneakyThrows | ||
protected Response waitResponseMeetingCondition(String method, String endpoint, String jsonEntity, Predicate<Response> condition) { | ||
for (int i = 0; i < MAX_TASK_RESULT_QUERY_TIME_IN_SECOND; i++) { |
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.
The worst case this line will run MAX_TASK_RESULT_QUERY_TIME_IN_SECOND
times, it will be 300 ? For every retry, it will sleep one second, so it will wait for 300 seconds, that's a long time. Do we really need so long time ? We should fail quickly within a reasonable time
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.
yeah, reduce to total 30s that should be enough for model to be undeployed.
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Thanks @Hailong-am for fixing the flaky tests. @ylwu-amzn This issue is not just for flaky tests. The undeploy response is giving |
Seems like @ylwu-amzn created an issue for this. |
Do we need to backport this to 2.14 branch? I don't see any backport label to this PR. |
I think this test case seems not flaky in the Release CI workflow. We don't see IT failure report yet. To not block the whole release. I think it's fine to not backport to 2.14 |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-2416-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 aa09014abdd0a890c9ea3a55bf472ecc7eb7e480
# Push it to GitHub
git push --set-upstream origin backport/backport-2416-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
* add wait for model to be undeployed Signed-off-by: Hailong Cui <ihailong@amazon.com> * spotless Signed-off-by: Hailong Cui <ihailong@amazon.com> * update model undeploy status Signed-off-by: Hailong Cui <ihailong@amazon.com> * reduce total wait time Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> (cherry picked from commit aa09014)
This reverts commit aa09014.
* add wait for model to be undeployed Signed-off-by: Hailong Cui <ihailong@amazon.com> * spotless Signed-off-by: Hailong Cui <ihailong@amazon.com> * update model undeploy status Signed-off-by: Hailong Cui <ihailong@amazon.com> * reduce total wait time Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> (cherry picked from commit aa09014)
Description
This PR is add waiting for model to be undeployed to fix flaky test introduced by #2363,
https://github.com/opensearch-project/ml-commons/actions/runs/8933312245/job/24539185907?pr=2402
Issues Resolved
[List any issues this PR will resolve]
Check List
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.