mljet icon indicating copy to clipboard operation
mljet copied to clipboard

Check connection to pypi refore docker build or refine logs

Open qnbhd opened this issue 3 years ago • 0 comments

Chunk of traceback

│   303 │   │   result_stream, internal_stream = itertools.tee(json_stream(res │
│   304 │   │   for chunk in internal_stream:                                  │
│   305 │   │   │   if 'error' in chunk:                                       │
│ ❱ 306 │   │   │   │   raise BuildError(chunk['error'], result_stream)        │
│   307 │   │   │   if 'stream' in chunk:                                      │
│   308 │   │   │   │   match = re.search(                                     │
│   309 │   │   │   │   │   r'(^Successfully built |sha256:)([0-9a-f]+)$',     │
╰──────────────────────────────────────────────────────────────────────────────╯
BuildError: The command '/bin/sh -c pip install --no-cache-dir -r 
requirements.txt' returned a non-zero code: 1

Process finished with exit code 1

Reproducing:

Turn off internet & run docker-based cook

Possible solutions

  • Add connection check to PYPI before build.
  • Refine logs & set timeout.

CC: @pacifikus

qnbhd avatar Nov 17 '22 20:11 qnbhd