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

Please improve handling of 0 sized files #37

Closed
jsoref opened this issue Sep 8, 2022 · 0 comments
Closed

Please improve handling of 0 sized files #37

jsoref opened this issue Sep 8, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jsoref
Copy link

jsoref commented Sep 8, 2022

Describe the bug

I asked this action to upload a 0 sized file, and it tried to repeatedly upload this file:

Start uploading asset: _release/stack-linux(size: 0) ...
Upload asset: stack-linux failed => Validation Failed: {"resource":"ReleaseAsset","code":"custom","field":"size","message":"size must be greater than or equal to 1"}
HttpError: Validation Failed: {"resource":"ReleaseAsset","code":"custom","field":"size","message":"size must be greater than or equal to 1"}
    at /home/runner/work/_actions/xresloader/upload-to-github-release/v1/lib/index.js:5143:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async run (/home/runner/work/_actions/xresloader/upload-to-github-release/v1/lib/index.js:20417:40)
Start uploading asset(1 retry): _release/stack-linux(size: 0) ...
============================= v4 API: query { repository (owner:"check-spelling", name:"stack") } =============================
Upload asset(1 retry): stack-linux failed => Validation Failed: {"resource":"ReleaseAsset","code":"custom","field":"size","message":"size must be greater than or equal to 1"}
HttpError: Validation Failed: {"resource":"ReleaseAsset","code":"custom","field":"size","message":"size must be greater than or equal to 1"}
    at /home/runner/work/_actions/xresloader/upload-to-github-release/v1/lib/index.js:5143:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async run (/home/runner/work/_actions/xresloader/upload-to-github-release/v1/lib/index.js:20417:40)
Start uploading asset(2 retry): _release/stack-linux(size: 0) ...

To Reproduce
Steps to reproduce the behavior:

This workflow creates a 0 byte file and then tries to publish a release using it:
https://github.com/check-spelling/stack/blob/2ab72aa0c81ae69a46df1443e1fc61e619012020/.github/workflows/integration-tests.yml

Here's the run https://github.com/check-spelling/stack/runs/8241496509?check_suite_focus=true

Expected behavior
If it isn't legal to publish a 0 byte file (and this appears to be the case), then the action should fail fast.

Screenshots
image

@owent owent self-assigned this Sep 8, 2022
@owent owent added the bug Something isn't working label Sep 8, 2022
@owent owent closed this as completed in 7fa9ffa Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants