# Soft-fail artifact uploads

**URL:** <https://forum.buildkite.community/t/soft-fail-artifact-uploads/2198>\
**Category:** Features Requests\
**Created:** [August 30, 2022, 10:54pm UTC](https://forum.buildkite.community/t/soft-fail-artifact-uploads/2198 "2022-08-30T22:54:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wilson](https://avatars.discourse-cdn.com/v4/letter/w/96bed5/32.png) [@wilson](https://forum.buildkite.community/u/wilson)\
**Post date:** [August 30, 2022, 10:54pm UTC](https://forum.buildkite.community/t/soft-fail-artifact-uploads/2198/1 "2022-08-30T22:54:00Z")

</div>

Hello, I’d like to request on failing to upload artifact be soft-fail. Currently, we define our artifacts using globs in a directory (i.e. log/test\_\*.log) using `artifact_paths:` option in pipeline YAML.

Our job is a test suite which writes to different files per test (e.g. log/test\_foo.log, log/test\_bar.log). The files are deleted if test passes but left on filesystem on failure. We are noticing that occasionally, on success, Buildkite agent thinks there a file exists when it doesn’t, proceeds to fail on upload, then failed the whole job (despite the tests passing!). Ideally, I want this to be soft-fail to not affect signal on our build success / failure.

Here is a screenshot of the logs on artifact upload:

 ![Screen Shot 2022-08-30 at 3.45.28 PM](https://us1.discourse-cdn.com/flex016/uploads/buildkite1/original/2X/8/8233d86201e07bc01127ec2a1f93aa4cd4bef5ad.png)

[I saw prior discussion around this feature, which seems like the current behavior is what was described on the old thread](https://forum.buildkite.community/t/fail-if-an-artifact-doesnt-exist-on-upload/433).

---

<div class="post-metadata">

**Author:** ![wilson](https://avatars.discourse-cdn.com/v4/letter/w/96bed5/32.png) [@wilson](https://forum.buildkite.community/u/wilson)\
**Post date:** [August 30, 2022, 10:55pm UTC](https://forum.buildkite.community/t/soft-fail-artifact-uploads/2198/2 "2022-08-30T22:55:40Z")

</div>

I suppose an alternative way to say this: it sounds like a bug where the glob expansion happened before the job finished, because the actual job command deletes the file before terminating.

---

<div class="post-metadata">

**Author:** ![suma](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/suma/32/1306_2.png) [@suma](https://forum.buildkite.community/u/suma)\
**Post date:** [September 1, 2022, 12:14am UTC](https://forum.buildkite.community/t/soft-fail-artifact-uploads/2198/3 "2022-09-01T00:14:28Z")

</div>

Hi @wilson

First of all welcome to Buildkite community and thank you for reaching out to us with you questions.

Yes, it would be interesting to check why in first place agent thinks there is a file existing and then fails when it tries to upload so we would like to check further on this.

Please can you send the information of the pipeline url with the details to [support@buildkite.com](mailto:support@buildkite.com) so we can check further on this to see what is happening here. Thank you
