Skip to content

Conversation

evan-onyx
Copy link
Contributor

@evan-onyx evan-onyx commented Jul 1, 2025

Description

Addresses https://linear.app/danswer/issue/DAN-2157/fix-drive-shared-with-me-for-specific-user

service account indexing was not properly including files shared with the user when indexing as a specific user

How Has This Been Tested?

tested in UI + unit test

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)
  • [Optional] Override Linear Check

@evan-onyx evan-onyx requested a review from a team as a code owner July 1, 2025 18:17
Copy link

vercel bot commented Jul 1, 2025

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 Jul 2, 2025 8:36pm

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.

PR Summary

Fixes Google Drive service account indexing to properly include files shared with specific users. The changes remove special UI handling and align backend behavior.

  • Hardcoded debugging code in backend/onyx/connectors/google_utils/google_utils.py needs to be removed before merging (document ID '1G0rnd9CdK8LTRc-V02U7uTWfuJjv_9f961LvbtHTTwg' and print statements)
  • Removes currentCredential parameter from createConnectorInitialValues in web/src/app/admin/connectors/[connector]/AddConnectorPage.tsx for better separation of concerns
  • Sets include_files_shared_with_me to default false in UI like other checkboxes instead of forcing true for service accounts
  • Added test case test_specific_user_email_shared_with_me to verify service account indexing behavior
  • Modified backend to correctly handle shared files when using service account authentication

5 files reviewed, 4 comments
Edit PR Review Bot Settings | Greptile

@evan-onyx evan-onyx added this pull request to the merge queue Jul 2, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 2, 2025
@Weves Weves merged commit 7af1030 into main Jul 2, 2025
14 of 15 checks passed
@Weves Weves deleted the bugfix/drive-missing-docs branch July 2, 2025 23:56
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* drive service account shared fixes

* oops

* ily greptile

* scrollable index attempt errors

* tentatively correct index errors page, needs testing

* mypy

* black

* better bounds in practice

* remove random failures

* remove console log

* CW
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