-
Notifications
You must be signed in to change notification settings - Fork 127
Postpone mkdir until start of upload #1956
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
Conversation
22c7110 to
bbd42c0
Compare
| return err | ||
| } | ||
| return false, nil | ||
|
|
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.
Can we still test if we have permission to write to a parent that does exist?
We run this during validation, so if we cannot write to the destination path, it's good to surface early.
bbd42c0 to
8c90966
Compare
This ensure that "bundle validate" does not create remote directory. Extend empty_bundle_test.go to check if remote path is created prematurely
8c90966 to
48048dd
Compare
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
|
Test Details: go/deco-tests/12279631939 |
|
This PR has not received an update in a while. If you want to keep this PR open, please leave a comment below or push a new commit and auto-close will be canceled. |
Changes
Move MkdirsByPath call outside of sync.New because sync.New is also used by "bundle validate" which is supposed to be side-effect-free.
Instead, remember if the path existed or not and then create it in RunOnce().
Tests
Extended TestAccEmptyBundleDeploy to also do "bundle validate" and to check that the path does appear but after deploy and not after validate.