Skip to content
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

Fixes dom0 updates in GUI updater #647

Merged
merged 3 commits into from
Nov 23, 2020
Merged

Fixes dom0 updates in GUI updater #647

merged 3 commits into from
Nov 23, 2020

Conversation

conorsch
Copy link
Contributor

Status

Ready for review

Description of Changes

Fixes #646

Changes proposed in this pull request:

Actually runs the package updates within dom0, by iterating over the
generator returned by the apply_updates function, ensuring the logic
runs. Revises the progress bar logic a bit, since the apply_updates
function is called twice, with different expectations about how much the
progress bar should increase.

Testing

Ideally, install 0.5.0 prod (that's n-1 from most current stable release). Then:

  1. Clone this branch to dom0
  2. sudo cp -v launcher/sdw_updater_gui/Updater{,App}.py /opt/securedrop/launcher/sdw_updater_gui/
  3. Close the updater GUI window if it is already open, to ensure a fresh start
  4. Confirm via `dnf info securedrop-workstation-dom0-config is at 0.5.0, not 0.5.1
  5. Confirm via qvm-ls | grep fedora-32 that fedora-32 is not installed on the system
  6. Run time /opt/securedrop/launcher/sdw-launcher.py --skip-delta 0 and proceed with upgrade
  7. Ensure that 0.5.1 RPM is installed
  8. Ensure that F32 is installed and set for all sys-* VMs
  9. Ensure no errors

Checklist

If you have made code changes

  • Linter (make flake8) passes in the development environment (this box may
    be left unchecked, as flake8 also runs in CI)

If you have made changes to the provisioning logic

  • All tests (make test) pass in dom0 of a Qubes install

  • This PR adds/removes files, and includes required updates to the packaging
    logic in MANIFEST.in and rpm-build/SPECS/securedrop-workstation-dom0-config.spec

Actually runs the package updates within dom0, by iterating over the
generator returned by the apply_updates function, ensuring the logic
runs. Revises the progress bar logic a bit, since the apply_updates
function is called twice, with different expectations about how much the
progress bar should increase.
Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

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

Changes here look good to me, tested these changes and observed that dom0 updates are being checked prior to dom0 state being applied, resolving #646 .

Before merging, I suggest we complete test coverage in Updater.py introduced by these changes:

----------- coverage: platform linux, python 3.7.3-final-0 -----------
Name                                 Stmts   Miss  Cover   Missing
------------------------------------------------------------------
sdw_notify/Notify.py                    44      0   100%
sdw_updater_gui/Updater.py             272     12    96%   61-66, 73-78, 108, 110
sdw_updater_gui/UpdaterApp.py          139    139     0%   1-219
sdw_updater_gui/UpdaterAppUi.py         95     95     0%   9-125
sdw_updater_gui/UpdaterAppUiQt5.py      84     84     0%   9-114
sdw_updater_gui/strings.py              14     14     0%   1-41
sdw_util/Util.py                        86      0   100%
------------------------------------------------------------------
TOTAL                                  734    344    53%

I've opened #649 to improve test coverage for other files.

Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

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

Thanks for updating the tests @zenmonkeykstop , tested the updater functionality locally and observed dom0 being updated. The changes here look good to me. Not approving for merge (yet) so that we can bump versions prior to final QA/release

zenmonkeykstop
zenmonkeykstop previously approved these changes Nov 20, 2020
Copy link
Contributor

@zenmonkeykstop zenmonkeykstop left a comment

Choose a reason for hiding this comment

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

Test plan passes happily. Approved.

After discussion with team, skipping rc1 since we've tested adequately,
and the change is quite small.
@conorsch
Copy link
Contributor Author

Thanks for testing! I've pushed a version bump 0.5.1 -> 0.5.2, and consider this ready for merge. Have not yet prepared or pushed a sign tag, will do so Monday, as part of pushing out the release.

Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

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

LGTM

@conorsch
Copy link
Contributor Author

Added tag: https://github.com/freedomofpress/securedrop-workstation/releases/tag/0.5.2, proceeding with merge and build.

@conorsch conorsch merged commit 9cb41a8 into main Nov 23, 2020
cfm pushed a commit that referenced this pull request Apr 1, 2024
@legoktm legoktm deleted the 646-fix-dom0-updates branch May 28, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Packages in dom0 are not being updated
3 participants