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

Migrate tenant upgrades to data plane #3051

Merged
merged 12 commits into from
Nov 8, 2024

Conversation

pablodanswer
Copy link
Contributor

@pablodanswer pablodanswer commented Nov 4, 2024

Description

Previously, we had a separate url/web server for users to provision tenants. This merges the functionality into the data plane

General approach

  • Provision the tenant on the data plane.
  • Attempt to create the tenant on the control plane.
  • If control plane creation is successful:
    • Proceed with user creation and authentication.
  • If control plane creation fails:
    • Rollback the data plane provisioning.
    • Inform the user of failure.

Copy link

vercel bot commented Nov 4, 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 Nov 8, 2024 3:11am

from danswer.db.users import get_user_by_email
from danswer.utils.logger import setup_logger
from danswer.utils.telemetry import optional_telemetry
from danswer.utils.telemetry import RecordType
from danswer.utils.variable_functionality import fetch_versioned_implementation
from ee.danswer.server.tenants.provisioning import get_or_create_tenant_id
Copy link
Contributor

Choose a reason for hiding this comment

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

No ee imports outside of ee folder

@@ -359,7 +359,7 @@ def stream_generator() -> Generator[str, None, None]:
yield json.dumps(packet) if isinstance(packet, dict) else packet

except Exception as e:
logger.exception(f"Error in chat message streaming: {e}")
logger.exception("Error in chat message streaming")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we changing this?

except Exception as e:
logger.exception(f"Unexpected error updating tenant tasks: {str(e)}")
except (AttributeError, KeyError):
logger.exception("Failed to process task configuration")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we not want these?

Merged via the queue into main with commit f6d8f5c Nov 8, 2024
7 checks passed
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