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

Multi tenant vespa #2762

Merged
merged 9 commits into from
Oct 13, 2024
Merged

Multi tenant vespa #2762

merged 9 commits into from
Oct 13, 2024

Conversation

pablonyx
Copy link
Contributor

Description

[Provide a brief description of the changes in this PR]

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Accepted Risk

[Any know risks or failure modes to point out to reviewers]

Related Issue(s)

[If applicable, link to the issue(s) this PR addresses]

Checklist:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

Copy link

vercel bot commented Oct 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 12, 2024 11:33pm

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request introduces multi-tenant support for Vespa indexing and search functionality across the Danswer application. Key changes include:

  • Added setup_multitenant_danswer() and setup_vespa_multitenant() functions in /backend/danswer/setup.py for multi-tenant Vespa index setup
  • Introduced tenant_id field in /backend/danswer/document_index/vespa/app_config/schemas/danswer_chunk.sd for Vespa schema
  • Modified VespaIndex class in /backend/danswer/document_index/vespa/index.py to support multi-tenant indexing and improved document deletion
  • Added SupportedEmbeddingModel class in /backend/shared_configs/model_server_models.py for managing multiple embedding models
  • Updated search preprocessing in /backend/danswer/search/preprocessing/preprocessing.py to include tenant-specific filtering

15 file(s) reviewed, 24 comment(s)
Edit PR Review Bot Settings | Greptile

backend/danswer/background/update.py Show resolved Hide resolved
backend/danswer/background/update.py Show resolved Hide resolved
backend/danswer/document_index/interfaces.py Show resolved Hide resolved
backend/danswer/document_index/interfaces.py Show resolved Hide resolved
backend/danswer/document_index/interfaces.py Show resolved Hide resolved
backend/danswer/search/models.py Show resolved Hide resolved
backend/danswer/setup.py Show resolved Hide resolved
backend/shared_configs/model_server_models.py Show resolved Hide resolved
* k

* data -> control

* nit

* nit: error handling

* auth + app

* nit: color standardization

* nit

* nit: typing

* k

* k

* feat: functional upgrading

* feat: add block for downgrading to seats < active users

* add auth

* remove accomplished todo + prints

* nit

* tiny nit

* nit: centralize security

* add tenant expulsion/gating + invite user -> increment billing seat no.

* add cloud configs

* k

* k

* nit: update
@pablonyx pablonyx changed the base branch from tenant_context_background to main October 12, 2024 18:39
Copy link
Contributor

@yuhongsun96 yuhongsun96 left a comment

Choose a reason for hiding this comment

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

Too long to read it all :| please double check over it and test it thoroughly

@pablonyx pablonyx added this pull request to the merge queue Oct 12, 2024
@pablonyx pablonyx removed this pull request from the merge queue due to a manual request Oct 12, 2024
@pablonyx pablonyx enabled auto-merge October 12, 2024 23:31
@pablonyx pablonyx added this pull request to the merge queue Oct 12, 2024
Merged via the queue into main with commit 20df20a Oct 13, 2024
7 checks passed
@pablonyx pablonyx deleted the multi_tenant_vespa branch October 17, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants