-
Notifications
You must be signed in to change notification settings - Fork 695
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
Moves securedrop-admin into Python 3 #4867
Conversation
rebase issue? |
459f7f6
to
3a15c7a
Compare
There can be two different ways to migrate the virtualenv for the admins.
I am going to test the first item in a vm now. |
c2f930e
to
3a15f0e
Compare
_
Probable reason: Old version of Ansible using |
@kushaldas I've appended a commit that resolves a few of the Ansible-related Python 3 issues. Tried most (but not all) of the test scenarios you outlined, and they've all been successful with the changes in place in Tails. For the record, I tested on Tails 3.16, with Python 3.5. Noticed some "weakref" stderr output in a few places, which is a significant cosmetic issue, but should not be a factor on Tails 4 / Python 3.7. Not approving, but I believe you should be unblocked for more vigorous testing now. Take another lap through it and see if you can identify any lingering Python 2 references that we haven't caught yet. When you're happy with it, I'd suggest we have @rmol and/or @zenmonkeykstop dig in for comprehensive review. |
@rmol @zenmonkeykstop please go ahead with full scale review. This worked in my local testing. |
#4865 was just merged, introducing conflicts here. We choose to merge #4865 first to minimize the manual conflict resolution. @rmol / @zenmonkeykstop please give a rebase here, holler in gitter with any blockers! |
On Tails 4.0~beta2 VM, checked out this branch and verified:
|
Tested on Tails 3.16 and prod VMs:
|
This will inform the admins to rerun ./securedrop-admin setup as this will create .venv3 dirctory for Python3 dependencies.
As Tor4 has Python 3.7.3, we should just mention without any particular version.
A smattering of the familiar Python 2 -> 3 changes, mostly around string handling, filepaths to interpreters and virtualenvs, and syntax updates. Specifically: * coerces major release number to int * converts iteritems() -> items() in dynamic inventory * updates string handling in dynamic inventory * ensures securedrop_init runs under python3 Tested under Tails 3.16 (based on Stretch), running Python 3.5. Worked well, after these fixes landed, although I've observed a handful of the "weakref" stderr output. The weakref output doesn't break anything, but it may be alarming to Admins who haven't updated to Tails 4 & Python 3.7 yet.
6266b56
to
bc898e3
Compare
Rebased to resolve conflicts introduced via merge of #4865. The sole conflict was:
which was manually solved as:
|
On Tails 3.15 VM, checked out the rebased branch and verified:
LGTM! |
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.
LGTM based on test plan.
While testing #4877 ran into an issue that may be worth flagging: we should ensure the 1.0.0 -> 1.1.0 docs have admins run |
--hash=sha256:1df952620eccb399c53ebb359cc7d9a8d3a9538cb34c5a1344bdbeb29fbcc381 \ | ||
--hash=sha256:3f473ae040ddaa52b52f97f6b4a493cfa9f5920c255a12dc56a7d34397a398a4 \ | ||
--hash=sha256:858588f1983ca497f1cf4ffde01d978a3ea02b01c8a26a8bbc5cd2e66d816917 | ||
prompt_toolkit==2.0.9 \ |
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.
was diff review performed here?
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.
Diff review has been performed (timeboxed to ~4 hr): https://github.com/freedomofpress/securedrop-debian-packaging/wiki/prompt_toolkit-1.0.15--2.0.9
Status
Work in progress
Description of Changes
Fixes #3489
This now needs an update of
prompt_toolkit
so that we can use it in Python3.5.Testing
In both Tails3, and Tails4, execute the following scenarios with prod vms/hardware:
./securedrop-admin sdconfig
./securedrop-admin install
./securedrop-admin tailsconfig
./securedrop-admin backup
./securedrop-admin restore
./securedrop-admin update
./securedrop-admin logs
./securedrop-admin reset_admin_access
Deployment
Any special considerations for deployment? Consider both:
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 locally