-
Notifications
You must be signed in to change notification settings - Fork 114
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
[parents_migration] Add and backfill Google Drive "Shared with me" folders #9507
Conversation
@@ -71,6 +72,10 @@ export class GoogleDriveConnectorStrategy | |||
}, | |||
transaction, | |||
}); | |||
await deleteDataSourceFolder({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this goes there
The Resource is not responsible for deleting stuff in core (i.e. it does not delete documents & tables too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't mean to put it here mb, moved it to the clean method of the ConnectorManager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure it goes there either; although maybe it should
i'd say it goes where we also delete documents and tables and soon other folders
(note: logged the task here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put all these deletes here too I think, can't really think of another place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left a com
e239c85
to
ebe0128
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍 Left 3 coms
@@ -129,6 +131,17 @@ export class GoogleDriveConnectorManager extends BaseConnectorManager<null> { | |||
googleDriveConfigurationBlob | |||
); | |||
|
|||
// Upserts to data_sources_folders (core) a top-level folder "Shared with me". | |||
const folderId = getInternalId(GOOGLE_DRIVE_SHARED_WITH_ME_VIRTUAL_ID); | |||
await upsertDataSourceFolder({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:cough: :cough: activity 😉
await concurrentExecutor( | ||
connectors, | ||
async (connector) => { | ||
const folderId = getInternalId(GOOGLE_DRIVE_SHARED_WITH_ME_VIRTUAL_ID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just checking: you told me documents already have this folderId in their parents right? (it was just not pointing to any real folder until this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually we never pass this as a parentId, I kept this PR iso-behavior with main but I can't figure out how it used to work. I'll check again and fix it if needed
Description
GOOGLE_DRIVE_SHARED_WITH_ME_VIRTUAL_ID
as aparentInternalId
but it still works because we return the correct nodes when querying getPermissions withparent=GOOGLE_DRIVE_SHARED_WITH_ME_VIRTUAL_ID
.Risk
Deploy Plan