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 multi tenancy support #489

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

Hailong-am
Copy link
Collaborator

@Hailong-am Hailong-am commented Jan 24, 2025

Description

Add multi tenancy support for tools

Related Issues

opensearch-project/ml-commons#3416

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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: Hailong Cui <[email protected]>
@xinyual
Copy link
Collaborator

xinyual commented Jan 24, 2025

So we need to add tenant id as a required parameter? Can we set a possible default value null? I think the code on opensource in front end should not be influenced.

@Hailong-am
Copy link
Collaborator Author

integration test need to let nerual-search take latest opensearch-ml-client with multi-tenancy so MLPredictionTaskRequest will have the logic to write

 if (streamOutputVersion.onOrAfter(VERSION_2_19_0)) {
        out.writeOptionalString(tenantId);
 }

https://github.com/opensearch-project/neural-search/actions/workflows/maven-publish.yml

@Hailong-am
Copy link
Collaborator Author

after run ./gradlew publishToMavenLocal for neural-search plugin, then running locally with ./gradlew build all tests are passed

@Hailong-am Hailong-am mentioned this pull request Jan 24, 2025
5 tasks
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.98%. Comparing base (2b76e3c) to head (5144fdf).
Report is 42 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #489      +/-   ##
============================================
+ Coverage     81.78%   81.98%   +0.19%     
- Complexity      193      281      +88     
============================================
  Files            11       15       +4     
  Lines           961     1410     +449     
  Branches        137      202      +65     
============================================
+ Hits            786     1156     +370     
- Misses          121      176      +55     
- Partials         54       78      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zhichao-aws
Copy link
Member

After neural-search upload latest snapshot, the CIs pass. @Hailong-am does this change need backport?

@xinyual xinyual merged commit 854c64d into opensearch-project:main Jan 24, 2025
10 of 11 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/skills/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/skills/backport-2.x
# Create a new branch
git switch --create backport/backport-489-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 854c64d9d58ce9a8c5d7319906bbb0f0e2466689
# Push it to GitHub
git push --set-upstream origin backport/backport-489-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/skills/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-489-to-2.x.

@xinyual
Copy link
Collaborator

xinyual commented Jan 24, 2025

@Hailong-am Can we backport manually?

@Hailong-am
Copy link
Collaborator Author

@Hailong-am Can we backport manually?

Will do

Hailong-am added a commit to Hailong-am/skills that referenced this pull request Jan 24, 2025
Signed-off-by: Hailong Cui <[email protected]>
(cherry picked from commit 854c64d)
zane-neo pushed a commit that referenced this pull request Jan 26, 2025
Signed-off-by: Hailong Cui <[email protected]>
(cherry picked from commit 854c64d)
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