Skip to content

chore: narrow no_vector_db supported scope#8847

Open
evan-onyx wants to merge 1 commit intomainfrom
feat/no-bg-container1
Open

chore: narrow no_vector_db supported scope#8847
evan-onyx wants to merge 1 commit intomainfrom
feat/no-bg-container1

Conversation

@evan-onyx
Copy link
Contributor

@evan-onyx evan-onyx commented Feb 27, 2026

Description

disallow deployments running with no_vector_db from being multi-tenant or using craft

How Has This Been Tested?

unit tests

Additional Options

  • [Optional] Please cherry-pick this PR to the latest release version.
  • [Optional] Override Linear Check

Summary by cubic

Adds startup validation to block DISABLE_VECTOR_DB when combined with MULTI_TENANT or ENABLE_CRAFT. This fails fast and limits no-vector-DB mode to single-tenant, no-Craft deployments.

  • Migration
    • If DISABLE_VECTOR_DB=true, set MULTI_TENANT=false.
    • Set ENABLE_CRAFT=false when disabling the vector DB.

Written for commit 033aeee. Summary will update on new commits.

@evan-onyx evan-onyx requested a review from a team as a code owner February 27, 2026 01:43
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 27, 2026

Greptile Summary

Added startup validation to prevent DISABLE_VECTOR_DB from being combined with MULTI_TENANT or ENABLE_CRAFT settings. The validation runs during app startup and provides clear error messages explaining why these combinations are incompatible.

  • Prevents multi-tenant deployments with no vector DB (requires per-tenant indexing)
  • Prevents Craft mode with no vector DB (requires background workers)
  • Includes comprehensive unit tests covering all scenarios
  • Minor style inconsistency: lazy import of ENABLE_CRAFT inside function while MULTI_TENANT is imported at module level

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • The validation logic is straightforward and well-tested. The only issue is a minor style inconsistency in import placement that doesn't affect functionality. Clear error messages and comprehensive test coverage reduce risk.
  • No files require special attention - the implementation is clean with good test coverage

Important Files Changed

Filename Overview
backend/onyx/main.py Added validation to prevent DISABLE_VECTOR_DB from being used with MULTI_TENANT or ENABLE_CRAFT settings, with clear error messages
backend/tests/unit/onyx/test_startup_validation.py Comprehensive unit tests covering all validation scenarios including edge cases and error message verification

Last reviewed commit: 033aeee

Copy link
Contributor

@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.

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

"mode when disabling the vector database."
)

from onyx.server.features.build.configs import ENABLE_CRAFT
Copy link
Contributor

Choose a reason for hiding this comment

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

Import ENABLE_CRAFT at module level with other imports for consistency, since MULTI_TENANT is already imported at the top (line 158)

Context Used: Context from dashboard - contributing_guides/best_practices.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@github-actions
Copy link
Contributor

🖼️ Visual Regression Report

Project Changed Added Removed Unchanged Report
admin 1 0 0 108 View Report
exclusive 0 0 0 8 ✅ No changes

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.

1 participant