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

Git Sources - Clone issue when multiple sources use the same repo #460

Open
DavieReid opened this issue Aug 25, 2023 · 0 comments
Open

Git Sources - Clone issue when multiple sources use the same repo #460

DavieReid opened this issue Aug 25, 2023 · 0 comments

Comments

@DavieReid
Copy link
Contributor

If 2 or more sources use the same repo then there is an error thrown when cloning:

[Mosaic] Source Error: Command 'git clone <repo url> --no-checkout --origin=origin' failed: 128. fatal: destination path '<repo project-name>' already exists and is not an empty directory.

Basically, this is a timing issue at heart.

  1. both sources start up
  2. check for a previous clone which doesn't exist
  3. clone the repo
  4. find out that the other source has created the repo directory first
  5. throw error

We have logic that checks for a previous clone but it does not work across sources. A git source is only aware of what it has done.

Workaround

Schedule the sources to start with different delays. Delayed sources won't attempt a clone and will re-use the earlier cloned repo.

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

No branches or pull requests

1 participant