copy_files_to_artifacts: error -> warning (#35613)

This error shows up a lot, typically it's harmless because an error
happened before the source build even started, in which case we don't
have build logs to copy. So, warn instead of error, cause it distracts
from the actual CI error.
This commit is contained in:
Harmen Stoppels 2023-02-22 12:53:42 +01:00 committed by GitHub
parent 6e477d547d
commit 3be9af8c13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1502,10 +1502,7 @@ def copy_files_to_artifacts(src, artifacts_dir):
try:
fs.copy(src, artifacts_dir)
except Exception as err:
msg = ("Unable to copy files ({0}) to artifacts {1} due to " "exception: {2}").format(
src, artifacts_dir, str(err)
)
tty.error(msg)
tty.warn(f"Unable to copy files ({src}) to artifacts {artifacts_dir} due to: {err}")
def copy_stage_logs_to_artifacts(job_spec, job_log_dir):