Page MenuHomeSoftware Heritage

Dockerfile: Avoid pip 21.3 version preventing working container override
ClosedPublic

Authored by ardumont on Oct 22 2021, 11:32 AM.

Details

Summary

Without this the container override would not install properly thus failing to start.

Related to T3685
Related to P1205

Test Plan

without fix, override container swh-scheduler-runner:

doco up -d
doco logs -f swh-scheduler-runner  # fails to start with paste error

With the fix, the container starts.

Diff Detail

Repository
rDENV Development environment
Branch
master
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 24651
Build 38472: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Oct 22 2021, 11:39 AM

Use correct repo to update diff...

Build is green

Patch application report for D6537 (id=23764)

Rebasing onto ecc0e2803e...

First, rewinding head to replay your work on top of it...
Fast-forwarded diff-target to base-revision-476-D6537.
Changes applied before test

See https://jenkins.softwareheritage.org/job/DSCH/job/tests-on-diff/476/ for more details.

This is the same diff as D6536 no ?

i updated the diff from the wrong local repository.
If you refresh it, that'd be the right diff now.

This is the same diff as D6536 no ?

Nevermind, you updated it right after.

This revision now requires review to proceed.Oct 22 2021, 11:42 AM
anlambert added a subscriber: anlambert.
anlambert added inline comments.
docker/utils/pyutils.sh
14

I already tested that pip option and it will fail to install swh-search as tree_sitter uses PEP-517 in its setup.py.

The only solution is to force installation of pip != 21.3 in Dockerfile.

This revision now requires changes to proceed.Oct 22 2021, 11:44 AM
docker/utils/pyutils.sh
14

Right, your remark reminds me that you already told me that... i had forgotten.

So the solution is within the dockerfile.

I did try an early fix on the Dockerfile which worked. Dropping the --upgrade pip in
the pip install instruction. Would that be ok then?

docker/utils/pyutils.sh
14

I would rather blacklist the 21.3 release when upgrading: pip install --upgrade 'pip!=21.3'.

docker/utils/pyutils.sh
14

ack, i'll try that one.

docker/utils/pyutils.sh
14

Thanks, that works.

A small warning explained it did as we asked, great.

WARNING: You are using pip version 21.2.4; however, version 21.3 is available.
You should consider upgrading via the '/srv/softwareheritage/venv/bin/python3 -m pip install --upgrade pip' command.

Adapt according to discussion

ardumont retitled this revision from pyutils: Fix failure to override container to Dockerfile: Avoid pip 21.3 version preventing working container override.Oct 22 2021, 12:07 PM
ardumont edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Oct 22 2021, 12:08 PM