Skip to content

Commit 3c7f688

Browse files
committed
* Dockerfile build: let Poetry create a venv (otherwise downstream builds using this image fail with weird self-installation errors)
* S3 pulling: catch urllib exceptions (when the cloud storage isn't available) so that the calling object manager isn't left in an inconsistent state.
1 parent 0f93579 commit 3c7f688

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poet
77
RUN mkdir /splitgraph
88
COPY . /splitgraph
99

10-
RUN $HOME/.poetry/bin/poetry config settings.virtualenvs.create false
10+
RUN $HOME/.poetry/bin/poetry config settings.virtualenvs.create true
1111
RUN cd /splitgraph && $HOME/.poetry/bin/poetry install --no-dev
1212

1313
# The pip-wheel-metadata is supposed to be temporary. For downstream image builds, Poetry tries to reinstall Splitgraph
@@ -18,4 +18,4 @@ RUN cd /splitgraph && $HOME/.poetry/bin/poetry install --no-dev
1818
# See https://github.com/pypa/pip/issues/6213
1919
RUN rm /splitgraph/pip-wheel-metadata -rf
2020

21-
CMD sgr
21+
CMD sgr

splitgraph/hooks/s3.py

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import tempfile
66
from concurrent.futures import ThreadPoolExecutor
77

8+
import urllib3
89
from minio import Minio
910
from minio.error import (BucketAlreadyOwnedByYou,
1011
BucketAlreadyExists, MinioError)
@@ -107,6 +108,10 @@ def _do_download(obj_id_url):
107108
except MinioError:
108109
logging.exception("Error downloading object %s", object_id)
109110
return
111+
except urllib3.exceptions.RequestError:
112+
# Some connection errors aren't caught by MinioError
113+
logging.exception("URLLib error downloading object %s", object_id)
114+
return
110115
engine = get_engine()
111116
engine.load_object(SPLITGRAPH_META_SCHEMA, object_id, object_response)
112117

0 commit comments

Comments
 (0)