Skip to content

Commit 00aee7b

Browse files
committed
Temporary hotfix for skip updating the step log if any sample is under review
Otherwise the script will fail
1 parent 401d440 commit 00aee7b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

clarity_ext/service/file_service.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,13 @@ def commit(self, disable_commits):
265265
if shared_file.id == artifact_id])
266266
local_file = os.path.join(self.upload_queue_path, artifact_id, file_name)
267267
self.logger.info("Uploading file {}".format(local_file))
268-
self.session.api.upload_new_file(artifact.api_resource, local_file)
268+
try:
269+
self.session.api.upload_new_file(artifact.api_resource, local_file)
270+
except requests.HTTPError as e:
271+
if "UNDER_REVIEW" in str(e):
272+
self.logger.error("Not able to upload step log as some of the samples are in review")
273+
else:
274+
raise e
269275

270276
def _split_file_name(self, name):
271277
m = re.match(self.SERVER_FILE_NAME_PATTERN, name)

0 commit comments

Comments
 (0)