What happens now
If an upload fails during ntk push, ntk prints the API error and stops uploading files.
The command still exits with status 0. Shell scripts, CI jobs, and agents therefore treat the push as successful.
How to reproduce
- Run
ntk push with at least two files and an invalid or expired API key.
- The first upload fails.
- The second file is not attempted.
- Run
echo $?.
The exit status is 0 even though the push failed.
The same behavior can be reproduced in a test by returning a failed response for the first file. Only one upload is attempted, and the command finishes normally.
What should happen
Keep the current stop-on-first-failure behavior for now.
When an upload fails, ntk should:
- stop the push;
- print the name of the failed file;
- print how many files were uploaded and how many were not attempted;
- exit with a non-zero status.
If every file uploads successfully, the command should exit with status 0.
Whether ntk should continue after some types of file error is a separate decision. This issue does not change pull or watch.
Done when
- A failed upload causes
ntk push to exit with a non-zero status.
- The output names the failed file and reports how much work was completed.
- Files after the failed upload are not attempted.
- A successful push still exits with status 0.
- Tests cover successful and failed pushes.
What happens now
If an upload fails during
ntk push, ntk prints the API error and stops uploading files.The command still exits with status 0. Shell scripts, CI jobs, and agents therefore treat the push as successful.
How to reproduce
ntk pushwith at least two files and an invalid or expired API key.echo $?.The exit status is 0 even though the push failed.
The same behavior can be reproduced in a test by returning a failed response for the first file. Only one upload is attempted, and the command finishes normally.
What should happen
Keep the current stop-on-first-failure behavior for now.
When an upload fails, ntk should:
If every file uploads successfully, the command should exit with status 0.
Whether ntk should continue after some types of file error is a separate decision. This issue does not change
pullorwatch.Done when
ntk pushto exit with a non-zero status.