Skip to content

Commit

Permalink
Encode error string to avoid Unicode failure
Browse files Browse the repository at this point in the history
also extend build time as it periodically timesout
  • Loading branch information
MushuEE committed Apr 7, 2021
1 parent 30b23d0 commit 7c766c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kettle/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ steps:
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/kettle:$_GIT_TAG', '.' ]
dir: kettle/
timeout: 1200s
timeout: 2000s
- name: gcr.io/cloud-builders/docker
args: [ 'tag', 'gcr.io/$PROJECT_ID/kettle:$_GIT_TAG', 'gcr.io/$PROJECT_ID/kettle:latest']
substitutions:
_GIT_TAG: '12345'
images:
- 'gcr.io/$PROJECT_ID/kettle:$_GIT_TAG'
- 'gcr.io/$PROJECT_ID/kettle:latest'
timeout: 1260s
timeout: 2000s
2 changes: 1 addition & 1 deletion kettle/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def retry(func, *args, **kwargs):
args_size = sys.getsizeof(args)
kwargs_str = ','.join('{}={}'.format(k, v) for k, v in kwargs.items())
print(f"Error running {func.__name__} \
([bytes in args]{args_size} with {kwargs_str}) : {err}")
([bytes in args]{args_size} with {kwargs_str}) : {str(err).encode('utf8')}")
return None # Skip
return func(*args, **kwargs) # one last attempt

Expand Down

0 comments on commit 7c766c4

Please sign in to comment.