Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Printer preflight #48

Merged
merged 1 commit into from
Jan 16, 2020
Merged

Printer preflight #48

merged 1 commit into from
Jan 16, 2020

Conversation

sssoleileraaa
Copy link
Contributor

@sssoleileraaa sssoleileraaa commented Jan 14, 2020

Description

  • Added start-vm method for making sure the Export VM is running from external VMs. This is for both printing and transferring documents to a drive
  • Added printer-preflight method for making sure only one supported printer is connected
  • Added method to check if less than or more than one supported printer is connected and new error code to tell the client when more than one printer is connected: ERROR_MULTIPLE_PRINTERS_FOUND.

Test

  1. Build the export debian package from this branch and install it in sd-export-usb
  2. Run the client and see that you get the correct screens for each case: 0 printers connected, 1 printer connected, and multiple printers connected.

@sssoleileraaa
Copy link
Contributor Author

i think the build-buster test failing is expected for now but i can't remember why... will look into this tomorrow

@sssoleileraaa
Copy link
Contributor Author

@emkll - I see that this causes a regression where it's sending ERROR_GENERIC back when no printer is connected instead of PRINTER_NOT_FOUND so please hold off on reviewing until I switch it from Draft to Ready for review. Mostly I was wondering if you agree with how I added start-vm as a supported export method. I thought it made most sense to not send a status code so the client could see if that status is None which would mean that no errors occurred, but let me know if you disagree with this approach. Thanks!

@sssoleileraaa sssoleileraaa marked this pull request as ready for review January 15, 2020 21:48
@sssoleileraaa
Copy link
Contributor Author

the build test is failing due to the following error reported freedomofpress/securedrop-client#699

the error message is:

Error downloading object: localwheels/Mako-1.0.7-py3-none-any.whl (87ee3f7): Smudge error: Error downloading localwheels/Mako-1.0.7-py3-none-any.whl (87ee3f74ba3ea544e683a5a22e7e34f4d1cf3ad34414b5f3858becf00facf1d6): batch response: Invalid deploy key for freedomofpress/securedrop-debian-packaging
Errors logged to /home/circleci/packaging/securedrop-debian-packaging/.git/lfs/logs/20200115T214038.961785472.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: localwheels/Mako-1.0.7-py3-none-any.whl: smudge filter lfs failed
fetch: Fetching reference refs/heads/master
batch response: Invalid deploy key for freedomofpress/securedrop-debian-packaging
error: failed to fetch some objects from 'https://github.com/freedomofpress/securedrop-debian-packaging.git/info/lfs'
make: *** [Makefile:36: install-deps] Error 2
./scripts/update-requirements
gpg: key F08893B959CAB065: 6 signatures not checked due to missing keys

@sssoleileraaa
Copy link
Contributor Author

The failing test might work after this fix: #50

Also, the latest commit was to fix rebase errors from export refactor.

Copy link
Contributor

@redshiftzero redshiftzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff looks good and I manually tested the no printer case and the printing happy path. For multiple printers, I only have one supported printer to test, however based on visual review of the diff this logic lgtm.

@redshiftzero redshiftzero merged commit 3f77dbd into master Jan 16, 2020
@redshiftzero redshiftzero deleted the printer-preflight branch January 16, 2020 23:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants