-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use system provided pip/setuptools #5110
Conversation
This will need a new build of the container image for packaging.
Builder image needed updates, and additional packages to resolve #5109
As mentioned in the warning of https://pip.pypa.io/en/stable/reference/pip_install/#hash-checking-mode
with locally-build builder image, |
On further investigation, |
…ebugging CI issue
8d96e18
to
6476ebb
Compare
Looks like a new file is added by |
@@ -139,6 +139,7 @@ def test_apache_journalist_interface_vhost(host): | |||
assert common_apache2_directory_declarations in f.content_string | |||
|
|||
|
|||
@pytest.mark.skip(reason="Blocking #5110") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to add this to stop testinfra
test from bombing out. It would be worth investigating why this test is failing rather than leaving the skip in place
There are some significant differences between
Probably worth discussing at least the first 2 of these, and pinning pip and setuptools. |
Not approved overall, just the apparmor update.
The |
I can explain a couple of those:
I believe this is expected with the
These are the versions in |
Cannot reproduce.
Then I destroyed the VMs, rebooted host machine, and tried again. All the above checks passed without issue again. As a sanity check, made sure to confirm that e.g. Have not yet investigated the pip/pkg_resources/setuptools version variation. |
Thanks for taking a look @conorsch - turns out it was the apparmor deny that was the problem. App was bombing out trying to load |
During sprint planning, we identified one remaining task prior to merge: as @rmol flagged, we're downgrading both pip & setuptools in this branch. Would pinning the pip & setuptools dependencies to the versions (to 20.0.2 and 45.1, respectively) resolve? It may be that the packaging logic changes here force use of system deps for those packages—adding a pin and rebuilding to evaluate would shed light on how substantial the changes are. @zenmonkeykstop will take a look at the pin strategy and report back to inform final review. |
I may have missed this when we discussed it, but do we have any concern about the wheel vs. egg packaging changes Kev flagged here? Knowing little about both formats, it seems innocuous enough, but just wanted to highlight it in case there may be unintended side effects. |
Picked apart the |
Spent a bit more time with the packaging logic today. @kushaldas what do you think of the following suggestion for the getting this PR in?
In other words, we'd be removing use of the Today I made a timeboxed attempt at the above, which you can find here: https://github.com/freedomofpress/securedrop/tree/fix_debian_packaging_again When I pick apart the resultant
The off-by-one difference in eggs shipped is a setuptools egg. That's much closer to the original packaging logic, and so fairly predictable. I'm not appending those changes to your branch here, because I ended bumping pip-compile to 4.4.0 and running it locally (i.e. on my host) to get it working. pip-compile v4.0.0 showed this error
For reasons I don't entirely understand, the |
I am okay with this. |
Hopefully, I think I found the solution, have to test first. |
The error in your branch with the I will be adding |
@conorsch https://github.com/freedomofpress/securedrop/tree/fix_debian_packaging_again_and_again branch has the fix, if you are okay with it, we can use that branch, and repush into this branch to get things going. |
After a lot of fighting over this, here are a few findings:
Now a few things we can do:
|
I like the 3rd option (but for 1.3.0). It introduces some duplication as it involves tracking dependencies both in requirements files and in the build Dockerfile, but the same would be true if a newer version of dh_virtualenv was available and it was being passed explicit pip etc versions. |
@kushaldas has committed to coordinating further w/ upstream and recommending next steps for this change. |
@kushaldas Is there any update on this yet? |
I have asked to retry the whole process again. I will do that sometimes this week and get back to the upstream and also here. |
(We'll continue to monitor the situation, but we've agreed that we're not able to make a change here for 1.3.0.) |
I have rebased and updated branch https://github.com/freedomofpress/securedrop/tree/fix_debian_packaging_again_and_again This branch has some extra updates in the requirements files, we can fix those later in a different commit (after venv works). Those came in because I ran To use the Current issuse:
To work on this brach:
^^ Python3 should be able to create a proper virtualenv. Instead I am getting the error pasted at the beginning of this comment. |
Most probably we will have to install python3-distuils too. |
This is now implemented in develop via #5484 |
This will need a new build of the container image for packaging.
Status
Ready for review
Description of Changes
Fixes #5109
Using venv module to create the virtualenv.
Testing
cd molecule/builder-xenial/
make build-container
cd -
BUILDER_IMAGE="quay.io/freedomofpress/sd-docker-builder-xenial:$(date +%Y_%m_%d)" make build-debs
We have to use the locally built container image to build the debian packages while testing the PR.
Deployment
Checklist
If you made changes to the server application code:
make lint
) and tests (make test
) pass in the development containerIf you made changes to
securedrop-admin
:make -C admin test
) pass in the admin development containerIf you made changes to the system configuration:
If you made non-trivial code changes:
If you made changes to documentation:
make docs-lint
) passed locallyIf you added or updated a code dependency:
Choose one of the following: