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

Connector deletion fix #2293

Merged
merged 4 commits into from
Sep 2, 2024
Merged

Connector deletion fix #2293

merged 4 commits into from
Sep 2, 2024

Conversation

hagen-danswer
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Sep 2, 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 Sep 2, 2024 6:33am

@Weves Weves merged commit aa84846 into main Sep 2, 2024
5 of 7 checks passed
@Weves Weves deleted the connector-deletion-fix branch September 2, 2024 06:32
@@ -274,32 +276,30 @@ def test_connector_deletion_for_overlapping_connectors(
user_performing_action=admin_user,
)

# EVERYTHING BELOW HERE IS CURRENTLY BROKEN AND NEEDS TO BE FIXED SERVER SIDE

# wait for deletion to finish
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Enabled this test, now that it should work properly

@@ -102,7 +102,7 @@ def delete_connector_credential_pair_batch(
UpdateRequest(
document_ids=[document_id],
access=access,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the fix. Basically, if the document didnt have any associated doc sets, it would not return any dict.
Setting it to None would just not update the doc set relationship at all in vespa.
So we can assume that if we are updating it and the document id isnt in the dict, that it has no sets related to it

@@ -524,38 +524,54 @@ def fetch_document_sets_for_documents(
db_session: Session,
) -> Sequence[tuple[str, list[str]]]:
"""Gives back a list of (document_id, list[document_set_names]) tuples"""
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seperated out the stmt building and added a comment

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