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

Upload should fail if the zipball would be empty and allow-empty-zipball is not true #47

Closed
mk-pmb opened this issue Jan 22, 2020 · 5 comments
Labels
v2-preview Available or fixed in the v2-preview

Comments

@mk-pmb
Copy link

mk-pmb commented Jan 22, 2020

While it was my fault that my Github action started to make empty zipballs, I would have preferred to be alerted of my bug way earlier. Therefor I suggest we add an option allow-empty-zipball, and unless that is explicitly set to true, we let the upload fail if the zipball would turn out empty.

@konradpabjan
Copy link
Collaborator

v2-preview was just released, more information here: #62

The behavior has changed pretty significantly. With v1 if you specified an empty directory, there would be an artifact created at the end that would be 0 bytes and no errors or warnings.

With v2-preview, if an empty directory is specified as part of the input, no artifact will be available at the end of the run and a warning will pop up to alert you that no files were found to upload.

image

A separate option to error out if no files are found seems pretty limited so I think a warning + no artifact is a good way of letting users know that they are in fact not uploading anything.

@konradpabjan konradpabjan added the v2-preview Available or fixed in the v2-preview label Mar 19, 2020
@Calinou
Copy link

Calinou commented Apr 22, 2020

I think it would be better to make this an error instead of a warning. Is there a reason for wanting a job that doesn't act as expected to succeed?

@konradpabjan
Copy link
Collaborator

v2 of artifact upload has been released and with it there are clear warnings if no files are found for upload. Your original problem stemmed from no awareness when an empty artifact was uploaded and I consider that to be fixed with v2.

I'm going to close this issue since the path not finding files is an indication of some user error and there is a clear warning now. If you still think that there should be an option to fail the upload if no files are found, I would open another issue here. Instead of allow-empty-zipball I would suggest something like fail-if-no-files-uploaded or something similar.

@themakshter
Copy link

I would like the option of failing the run instead of posting a warning if the file specified is not found. Should I create a separate issue for it @konradpabjan ?

@mk-pmb
Copy link
Author

mk-pmb commented Jun 27, 2020

Sorry for the noise a minute ago. Yes, I think the "If you still think that…" sentence was meant as you should open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2-preview Available or fixed in the v2-preview
Projects
None yet
Development

No branches or pull requests

4 participants