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

Fix issue with github storage running in non-empty directories #6693

Merged
merged 3 commits into from
Sep 6, 2022

Conversation

cicdw
Copy link
Member

@cicdw cicdw commented Sep 2, 2022

When running a deployment within a Docker image that has a non-empty working directory, GitHub storage would fail because git clone errors out if the directory is non-empty. This PR adjusts the logic to git clone into a temporary directory (that will always be empty) and then recursively copy all files over into the present working directory. This code path is the same as if a user had specified a subdirectory of their repository, so a nice side effect is a unified code path.

QA'ed live with @discdiver @WillRaphaelson and @khuyentran1401

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • This pull request includes tests or only affects documentation.
  • This pull request includes a fix, feature, enhancement, docs, or maintenance label categorizing the change.

@cicdw cicdw added bug Something isn't working component:deployment Related to workflow deployments labels Sep 2, 2022
@netlify
Copy link

netlify bot commented Sep 2, 2022

Deploy Preview for prefect-orion ready!

Name Link
🔨 Latest commit 4656793
🔍 Latest deploy log https://app.netlify.com/sites/prefect-orion/deploys/6312897bb7f36300087b7078
😎 Deploy Preview https://deploy-preview-6693--prefect-orion.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@cicdw cicdw added fix A fix for a bug in an existing feature and removed bug Something isn't working labels Sep 3, 2022
@cicdw cicdw merged commit 53ebab3 into main Sep 6, 2022
@cicdw cicdw deleted the fix-empty-git branch September 6, 2022 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:deployment Related to workflow deployments fix A fix for a bug in an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants