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

Remove ee #3093

Merged
merged 10 commits into from
Nov 9, 2024
Merged

Remove ee #3093

merged 10 commits into from
Nov 9, 2024

Conversation

pablonyx
Copy link
Contributor

@pablonyx pablonyx commented Nov 9, 2024

Description

Fully remove ee imports from non ee modules (use fetch_versioned instead)

New fetch_versioned method for functionality that has no functional non-ee equivalent (and raises exception for missing modules in ee enabled environments

How Has This Been Tested?

  • Core EE flows tested (token rate limits, user groups, etc.)
  • Authentication with multi tenancy enabled, disabled

Accepted Risk (provide if relevant)

N/A

Related Issue(s) (provide if relevant)

N/A

Mental 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

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)

Copy link

vercel bot commented Nov 9, 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 9, 2024 7:26pm

@pablonyx pablonyx marked this pull request as ready for review November 9, 2024 19:23
@Weves Weves added this pull request to the merge queue Nov 9, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 9, 2024
@Weves Weves added this pull request to the merge queue Nov 9, 2024
Merged via the queue into main with commit 9272d6e Nov 9, 2024
7 checks passed
@Weves Weves deleted the remove_ee branch November 9, 2024 21:41
@steyer-mika
Copy link

steyer-mika commented Nov 11, 2024

@pablodanswer Are you sure that this code worked? If I try to register a user (im on the main branch without ee turned on) I get the following error:
File "/app/danswer/auth/users.py", line 231, in create
tenant_id = await fetch_ee_implementation_or_noop(...)
TypeError: object function can't be used in 'await' expression

It seems that when EE is disabled, the function fetch_ee_implementation_or_noop returns a no-op lambda that directly yields the async_return_default_schema function object instead of calling it. This leads to the error because await is applied to the function object itself rather than the result of calling the function.

To fix this, I believe the no-op lambda should actually invoke async_return_default_schema with the provided arguments, like so:
return lambda *args, **kwargs: async_return_default_schema(*args, **kwargs)

But I am not sure (I am no python dev).

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.

3 participants