ml-commons icon indicating copy to clipboard operation
ml-commons copied to clipboard

Add feature enable setting for controller index

Open b4sjoo opened this issue 1 year ago • 1 comments

Description

This PR will add a feature enable setting for controller index, to support multi-tenancy

Check List

  • [ ] New functionality includes testing.
    • [ ] All tests pass
  • [ ] New functionality has been documented.
    • [ ] New functionality has javadoc added
  • [X] 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.

b4sjoo avatar Jul 16 '24 08:07 b4sjoo

Shouldn't we check this kind of places too: https://github.com/opensearch-project/ml-commons/blob/b6618b2bcd18ab7070a8b8923074d365efe89dd9/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java#L1044

dhrubo-os avatar Jul 16 '24 19:07 dhrubo-os

@b4sjoo Any update on this?

dhrubo-os avatar Sep 03 '24 15:09 dhrubo-os

@b4sjoo Any update on this?

@dhrubo-os I don't think there are any blocking comments left, can we approve and merge it?

b4sjoo avatar Sep 03 '24 15:09 b4sjoo

I haven't see any unit tests when controller is disabled for the transport actions. Can we add some tests accordingly?

dhrubo-os avatar Sep 03 '24 15:09 dhrubo-os

Integration tests are failing. I retried now. I left few comments @b4sjoo

dhrubo-os avatar Sep 03 '24 15:09 dhrubo-os

I haven't see any unit tests when controller is disabled for the transport actions. Can we add some tests accordingly?

Fine I can add them when I get back. Not a hard job

b4sjoo avatar Sep 03 '24 15:09 b4sjoo

I think we should also check here before performing deletion?

dhrubo-os avatar Sep 16 '24 19:09 dhrubo-os

I think we should also check here before performing deletion?

No need because it calls DeleteControllerTransportAction, which already have applied feature flag. No need to do the duplicated call.

b4sjoo avatar Sep 17 '24 08:09 b4sjoo

The backport to feature/multi_tenancy failed:

The process '/usr/bin/git' failed with exit code 1

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-feature/multi_tenancy feature/multi_tenancy
# Navigate to the new working tree
cd .worktrees/backport-feature/multi_tenancy
# Create a new branch
git switch --create backport/backport-2652-to-feature/multi_tenancy
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a72181a0fadd32dd16b7a84092dc2e7e2fc4d8b9
# Push it to GitHub
git push --set-upstream origin backport/backport-2652-to-feature/multi_tenancy
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-feature/multi_tenancy

Then, create a pull request where the base branch is feature/multi_tenancy and the compare/head branch is backport/backport-2652-to-feature/multi_tenancy.