-
Notifications
You must be signed in to change notification settings - Fork 46
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
Change JSON key "last_updated" in sdw-update-flag
to "last_status_update"
#433
Conversation
…pdate" The use of `last_updated` here is ambiguous with with the usage in the separate file `sdw-last-udpated`, which contains the time of the last successful update of the SecureDrop Workstation. The `last_updated` key in `sdw-last-updated` contains the timestamp of the last time the status itself was written to disk, regardless of success or failure.
e222458
to
8efc122
Compare
Personally I think |
("flag" doesn't clearly speak to the purpose of the file and is not used in the JSON keys)
Per brief chat at standup, renamed the file as well; leaving in draft for now until I give it one quick run-through in Qubes. |
Tested in Qubes, works as expected. |
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 and functional testing looks good to me.
The only issue that should be addressed before merge, IMO, should be a clean up of all the dom0 flags (see inline).
While testing this pr, I discovered an related but not related bug. If you think it makes sense to take a stab at fixing this, that would be great otherwise I will open a follow up.
The reboot_required case should be handled at this point and show the reboot button
else: |
str:
- apply updates that require a reboot
- close app
- open app (no updates required), error is shown (because
REBOOT_REQUIRED
case is not handled, and is part of the catch-all)
dom0/sd-clean-all.sls
Outdated
@@ -21,6 +21,7 @@ remove-dom0-sdw-config-files: | |||
- /etc/qubes-rpc/policy/securedrop.Log | |||
- /etc/qubes-rpc/policy/securedrop.Proxy | |||
- /home/{{ gui_user }}/Desktop/securedrop-launcher.desktop | |||
- /home/{{ gui_user }}/.securedrop_launcher/sdw-update-flag |
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.
We should at least remove the other flags as well (the current, working flags) and consider deleting the entire folder (which include the logs)
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.
I was wondering about that; I thought you maybe intentionally omitted the folder. But I agree, it should clean up everything.
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.
Done and tested. If you prefer to preserve the logs we can list individual files instead, but it would feel a bit wrong to me to leave this directory hanging around after a make clean
.
I'll file a separate issue for that, thanks for the clear STR |
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.
thanks @eloquence , lgtm
Change JSON key "last_updated" in `sdw-update-flag` to "last_status_update"
The use of
last_updated
here is ambiguous with with the usage in the separate filesdw-last-udpated
, which contains the time of the last successful update of the SecureDrop Workstation.The
last_updated
key insdw-last-updated
contains the timestamp of the last time the status itself was written to disk, regardless of success or failure.I have also renamed the file itself to
sdw-update-status
for clarity, since that is the purpose of the file.Status
Ready for review
Testing
sdw-update-status
when running the updatermake clean
removes file under old name