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

Fix long pending issue when deleting model #1882

Merged
merged 10 commits into from
Feb 7, 2024

Conversation

zane-neo
Copy link
Collaborator

@zane-neo zane-neo commented Jan 17, 2024

Description

This fixes the occasional pending forever issue of deprovision API in flow framework. When delete model failed, e.g. model status is note allowed to delete, the delete model request is not been responded and flow framework will pending waiting.

Issues Resolved

NA

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.

@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env January 17, 2024 04:18 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env January 17, 2024 04:18 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env January 17, 2024 04:18 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env January 17, 2024 04:18 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env January 17, 2024 04:18 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env January 17, 2024 04:18 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env January 17, 2024 04:41 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env January 17, 2024 04:41 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env January 17, 2024 04:41 — with GitHub Actions Inactive
@zane-neo zane-neo had a problem deploying to ml-commons-cicd-env January 17, 2024 06:02 — with GitHub Actions Failure
@zane-neo zane-neo had a problem deploying to ml-commons-cicd-env January 17, 2024 06:02 — with GitHub Actions Failure
@zane-neo zane-neo had a problem deploying to ml-commons-cicd-env January 17, 2024 06:02 — with GitHub Actions Failure
@ylwu-amzn
Copy link
Collaborator

Github CI failed

[ant:jacocoReport] Rule violated for class org.opensearch.ml.action.models.DeleteModelTransportAction.1: branches covered ratio is 0.5, but expected minimum is 0.7
> Task :opensearch-ml-plugin:jacocoTestCoverageVerification FAILED

Signed-off-by: zane-neo <[email protected]>
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env February 7, 2024 09:53 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env February 7, 2024 09:53 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env February 7, 2024 09:53 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env February 7, 2024 09:53 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env February 7, 2024 09:53 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env February 7, 2024 09:53 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env February 7, 2024 10:22 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env February 7, 2024 10:22 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env February 7, 2024 10:22 — with GitHub Actions Inactive
@@ -174,7 +175,7 @@ protected MLUndeployModelNodesResponse newResponse(
deployToAllNodes.put(modelId, false);
}
updateRequest.index(ML_MODEL_INDEX).id(modelId).doc(updateDocument);
bulkRequest.add(updateRequest);
bulkRequest.add(updateRequest).setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you see anywhere else missed this?

@zane-neo zane-neo merged commit f18eaf3 into opensearch-project:main Feb 7, 2024
14 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 7, 2024
* Fix long pending issue when deleting model

Signed-off-by: zane-neo <[email protected]>

* Refine the delete model code

Signed-off-by: zane-neo <[email protected]>

* refactor delete model flow to make sure all dependent resources are deleted together with model metadata

Signed-off-by: zane-neo <[email protected]>

* fix minor issue to make sure only non-remote model will deelete chunks

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* fix failure UTs

Signed-off-by: zane-neo <[email protected]>

* Change to delete model metadata first

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* Remove remote function check

Signed-off-by: zane-neo <[email protected]>

* Fix failure UTs

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
(cherry picked from commit f18eaf3)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 7, 2024
* Fix long pending issue when deleting model

Signed-off-by: zane-neo <[email protected]>

* Refine the delete model code

Signed-off-by: zane-neo <[email protected]>

* refactor delete model flow to make sure all dependent resources are deleted together with model metadata

Signed-off-by: zane-neo <[email protected]>

* fix minor issue to make sure only non-remote model will deelete chunks

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* fix failure UTs

Signed-off-by: zane-neo <[email protected]>

* Change to delete model metadata first

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* Remove remote function check

Signed-off-by: zane-neo <[email protected]>

* Fix failure UTs

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
(cherry picked from commit f18eaf3)
ylwu-amzn pushed a commit that referenced this pull request Feb 7, 2024
* Fix long pending issue when deleting model

Signed-off-by: zane-neo <[email protected]>

* Refine the delete model code

Signed-off-by: zane-neo <[email protected]>

* refactor delete model flow to make sure all dependent resources are deleted together with model metadata

Signed-off-by: zane-neo <[email protected]>

* fix minor issue to make sure only non-remote model will deelete chunks

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* fix failure UTs

Signed-off-by: zane-neo <[email protected]>

* Change to delete model metadata first

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* Remove remote function check

Signed-off-by: zane-neo <[email protected]>

* Fix failure UTs

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
(cherry picked from commit f18eaf3)

Co-authored-by: zane-neo <[email protected]>
ylwu-amzn pushed a commit that referenced this pull request Feb 7, 2024
* Fix long pending issue when deleting model

Signed-off-by: zane-neo <[email protected]>

* Refine the delete model code

Signed-off-by: zane-neo <[email protected]>

* refactor delete model flow to make sure all dependent resources are deleted together with model metadata

Signed-off-by: zane-neo <[email protected]>

* fix minor issue to make sure only non-remote model will deelete chunks

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* fix failure UTs

Signed-off-by: zane-neo <[email protected]>

* Change to delete model metadata first

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* Remove remote function check

Signed-off-by: zane-neo <[email protected]>

* Fix failure UTs

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
(cherry picked from commit f18eaf3)

Co-authored-by: zane-neo <[email protected]>
austintlee pushed a commit to austintlee/ml-commons that referenced this pull request Mar 19, 2024
* Fix long pending issue when deleting model

Signed-off-by: zane-neo <[email protected]>

* Refine the delete model code

Signed-off-by: zane-neo <[email protected]>

* refactor delete model flow to make sure all dependent resources are deleted together with model metadata

Signed-off-by: zane-neo <[email protected]>

* fix minor issue to make sure only non-remote model will deelete chunks

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* fix failure UTs

Signed-off-by: zane-neo <[email protected]>

* Change to delete model metadata first

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* Remove remote function check

Signed-off-by: zane-neo <[email protected]>

* Fix failure UTs

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[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.

3 participants