Skip to content

GDrive provider creates duplicate folders when multiple representations sync concurrently #69

@herniguerra

Description

@herniguerra

Is there an existing issue for this?

  • I have searched the existing issues and added correct labels.

Description

Current Behavior

When publishing assets with multiple representations (rig + hero + workfile), SiteSync creates duplicate folders with identical names in Google Drive. Two "Marshie" folders appear at /Pipeline/publish/nevatars/Marshie/, both created at the exact same timestamp.

One folder contains rig/ and workfile/, while the duplicate contains rigMain/. This indicates a race condition where concurrent async upload tasks create the same parent folder multiple times.

Expected Behavior

A single folder hierarchy should be created:

/Pipeline/publish/nevatars/Marshie/
├── rig/
│   ├── v003/
│   └── hero/
└── workfile/
    └── v003/

The create_folder() method should reuse existing folders instead of creating duplicates.

Steps To Reproduce:

  1. Configure SiteSync with Google Drive (Shared Drive) as remote provider
  2. Enable hero version publishing (Integrate Hero Version plugin)
  3. Publish a rig from Maya that creates multiple representations (rig, hero, workfile)
  4. Wait for SiteSync to upload to Google Drive
  5. Check GDrive - duplicate parent folders appear with same timestamp

Additional context:

Version

  • SiteSync: 1.2.5
  • AYON Core: 1.1.7
  • AYON Server: 1.12.5

What platform were you running when you found the bug?

Windows

Root Cause Analysis

The issue is in gdrive.py create_folder(). Multiple async tasks via asyncio.gather() race to create folders. The folder_path_exists() check only queries the in-memory tree cache, not GDrive directly.

Google Drive uniquely allows multiple folders with identical names in the same parent.

Workaround

Disable "Integrate Hero Version" plugin to reduce concurrent uploads.

Related

Possibly related to #62 fix in 1.2.5 which increased concurrent upload scenarios.

Image

Relevant log output:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions