-
Notifications
You must be signed in to change notification settings - Fork 401
Manual deployment hangs with a deployment folder that starts with a dot #1227
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
Comments
@erezrokah Any advice on how this should be handled? It looks like this is the desired behavior, here the The This seems like the intended behavior in order to prevent walking all hidden directories ( |
Throwing an error would already be an improvement, but why should it be impossible to deploy from a hidden directory? A hidden directory seems like a reasonable choice for generated files that the user normally doesn't interact with. |
I agree that it's a valid use case. I'm not very familiar with the code, but it seems it would require a bit more effort to build this feature. I'd be happy to implement, just asking for some direction before taking this one. |
Okay, thanks. I guess it wouldn't be the end of the world if hidden directories are forbidden (just a little odd). |
@d4h0 I've opened two PR's to address the issue. If that isn't the desired outcome then it will be pretty easy to implement code to throw an error. |
Thanks @monsonjeremy, seems like this is also related to the second bullet here #1225 (comment) |
I was able to reproduce the issue, but only if there is no
@d4h0 can you confirm that running |
@erezrokah I'm not sure that adding ✔ Finished hashing 1 files
... I believe that is only the I tested this on the branch with my changes, and it logs out: ✔ Finished hashing 2 files
... To me this confirms that the issue still exists, even with an empty |
There are 2 separate issues here I think:
|
@erezrokah I agree, however I think they are both related. Fixing the second bullet will also fix the first one since the hidden directory will be picked up, allowing the deploy to work because files are found. |
Correct, but it will fix only one variation of the first bug. Trying to deploy an empty folder (without a |
I can make a separate DX issue for throwing an error if trying to deploy an empty folder, it seems that is worth encompassing in a separate ticket with low priority. What do you think? |
Since this issue is about deployment getting hanged we can keep it as is. |
Sounds good @erezrokah! Thanks for the clarification, really appreciate it. Do you think we should keep my two PR's open as is in the meantime, or should I open a new issue and reference those PR's in there? |
Maybe I'm misunderstanding something, but I created this issue specifically because deploying a hidden directory failed (see the title of the issue ;))
Yes, it seems only "netlify.toml" is processed. I have four files, and during a successful deployment (of a non-hidden directory), 5 files are processed (when "netlify.toml" exists). With a hidden directory (when "netlify.toml" exists), one file is processed, so I guess that's "netlify.toml". I found out something new: If I try to deploy a non-hidden folder that's in a hidden folder (".build/deploy"), everything works! :) |
Trying to clear the confusion - I believe the deploy gets stuck when the logic inside the js-client that looks for files to deploy tries to deploy an empty set of files. I'm going to fix the empty set of files getting stuck issue first, and then take a deeper look at which files should be deployed. It seems that netlify build bot doesn't care about hidden files, so I think the CLI should not care too. |
Alright, thanks for the effort, @erezrokah. |
Following up on this specific case, buildbot does ignore hidden files: |
@erezrokah Does that mean we should change the CLI |
Yes! Submitted a PR for this here #1272 |
Describe the bug
Executing 'netlify deploy -d .build' does not find any files, and hangs during the upload.
Here is the output of a tried deployment:
You see, no files were found (even so there are files).
To Reproduce
Steps to reproduce the behavior:
Configuration
I'm using the default
netlify.toml
(I didn't change anything).Expected behavior
The CLI finds files in the deployment folder, and the upload succeeds (at least, if there is a problem, there should be an error message)
CLI Output
See above
Additional context
After changing the name of the deployment folder from ".build" to "build", everything works as expected
The text was updated successfully, but these errors were encountered: