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

[MS connector] Tweaks on incremental sync #6357

Merged
merged 6 commits into from
Jul 21, 2024
Merged

[MS connector] Tweaks on incremental sync #6357

merged 6 commits into from
Jul 21, 2024

Conversation

philipperolet
Copy link
Contributor

@philipperolet philipperolet commented Jul 19, 2024

Description

Fixes a few remaining issues in incremental sync:

  • parentInternalId should be null by default, and always null for roots;
  • handle 410 require resync error
  • when a folder moves, updates all parents

Fixes #6289

Risk

na

Copy link
Contributor

@JulesBelveze JulesBelveze left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏼

? null
: getParentReferenceInternalId(driveItem.parentReference);

// check if we
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: missing something here I guess 😺

dataSourceConfig: DataSourceConfig;
startSyncTs: number;
}) {
const children = await folder.fetchChildren();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I added an optional argument where you can pass a list of nodeTypes to filter on. Not gonna change much but you could do:

const children = await folder.fetchChildren(["file", "folder"]);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In that case, i'd rather fetch all children and have the code err if they're not files or folders --- since it should not happen (not sure i'm clear 😅 happy to clarify irl)

@philipperolet philipperolet merged commit b2c981e into main Jul 21, 2024
7 checks passed
@philipperolet philipperolet deleted the ms-incrsync2 branch July 21, 2024 14:59
albandum pushed a commit that referenced this pull request Aug 28, 2024
* fix: parentInternalId should be null by default, and always null for roots

* handle 410 require resync error

* update parents on folder movement

* fix movement detection

* lint

* clean com
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.

[MS connector] Handle parents update in incremental sync
2 participants