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

Rename VMs for clarity #407

Merged
merged 4 commits into from
Jan 20, 2020
Merged

Rename VMs for clarity #407

merged 4 commits into from
Jan 20, 2020

Conversation

eloquence
Copy link
Member

@eloquence eloquence commented Jan 14, 2020

Renames the following:

  • sd-svs -> sd-app
  • sd-export-usb -> sd-devices
  • sd-svs-disp -> sd-viewer

See #285 for background and discussion.

Resolves #285. (Not changing buster naming convention for cost/benefit reasons.)

Dependent PRs:

Status

Ready for review

Deployment

Once all PRs are merged, make clean && make all should do the trick, but the client will only work if you are using a dev build or a nightly that incorporates the changes.

Testing

  1. make clean && make all on this branch (make sure you have no conflicting sd-app VM in place)
  2. Verify that all VMs are named as described.
  3. Build a new securedrop-client package on the vm-rename branch of securedrop-client, and install it in the sd-app-buster-template. Restart sd-app to pick up the change.
  4. Run the client. Verify that you can successfully log in, download, open, and export files.

@eloquence
Copy link
Member Author

@emkll I was able to verify that this PR works as expected, following the testing instructions in the PR body. I'm leaving it in draft for now, but it's ready for you to take as spin :)

@eloquence eloquence marked this pull request as ready for review January 16, 2020 19:49
eloquence added a commit to freedomofpress/securedrop-builder that referenced this pull request Jan 17, 2020
@eloquence
Copy link
Member Author

eloquence commented Jan 17, 2020

In a separate branch I've created here and in the packaging repo, I've pushed optional follow-up changes to rename the securedrop-workstation-svs-disp package. Since it's never exposed to the user this is really more of a consistency/tech debt avoidance change so we don't wonder a year from about the meaning of "svs-disp".

freedomofpress/securedrop-builder@05b488b

f4ef7d0

I've successfully built a securedrop-workstation-viewer package with those commits, but I realize that a more elegant rename would record the name change in the changelog etc. I'm assuming we'd also have to issue and upload a new version so that reprovisioning succeeds, if we want to pull those changes in. Looking to reviewer guidance on that if the changes in this PR look goo.

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.

This is great work, I have not encountered any issues based on my local testing:

Followed testing plan as described in pr description:

  • make clean && make all on this branch (make sure you have no conflicting sd-app VM in place)
  • Verify that all VMs are named as described.
  • Build a new securedrop-client package on the vm-rename branch of securedrop-client, and install it in the sd-app-buster-template. Restart sd-app to pick up the change.
  • Run the client. Verify that you can successfully log in, download, open, and export files

Performed further testing as folllows

  • make test all tests pass
  • make {sd-viewer, sd-app, sd-devices} and make remove-{sd-viewer, sd-app, sd-devices} work as expected

I think the order of operations should be as follows:

Review and merge at the same time:
0. Finish review (but not merge) this PR

  1. https://github.com/freedomofpress/securedrop-client/pull/701/files
  2. VM rename per https://github.com/freedomofpress/securedrop-workstation/issues/285 securedrop-builder#128

Once daily builds cron job will run, existing client nightlies will break on any workstation not provisioned on this branch.

  1. Merge this PR.

Inform all users to run make clean, make clone, make all on latest master of this repo.

The two others are test/docs only, and can be merged at any point.

Regarding renaming the sd-svs-disp package to sd-viewer, I would advocate we do it separately from this PR as it will not break existing installs, but will simply not update the sd-svs-disp package, (until someone runs make sd-viewer on the updated branch)

"sd-svs-template",
"sd-svs-disp-template",
"sd-export-template",
"sd-app-template",
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of switching the names of historical templates, i would perhaps advocate we either

  1. keep them in place
  2. replace these with the legacy name (e.g. sd-svs-buster-template)

Copy link
Member Author

Choose a reason for hiding this comment

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

how about 3. both? If the intent here is to ensure that old templates don't exist, we can just expand the list and call it OLD_TEMPLATES or something similar. because if we just do 2., the test won't fail for stretch users.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes I think old templates that contains STRETCH_TEMPLATES (prior to these changes) as well as the newly replaced templates (sd-svs-disp-buster-template, sd-svs-buster-template and sd-export-template) is a good idea

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 550065c (went with DEPRECATED_TEMPLATES)

@@ -5,7 +5,7 @@

class SD_SVS_Disp_Tests(SD_VM_Local_Test):
Copy link
Contributor

Choose a reason for hiding this comment

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

This class name was not changed. I see that it will be changed once we change the name of the package to sd-viewer, but in this case the class of the test represents the vm name and not the package installed

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense, should be fixed in ecd8b37

@@ -12,38 +12,38 @@ TASK=${1:-default}
# 2. The AppVM must not be a DispVM template that used as the default DispVM
# for an AppVM, nor the system default DispVM.
if [[ $TASK == "prepare" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Logic in this file in un-testable, but the diff looks good to me, I am wondering if, at this point, if it's worth keeping only for its historical value

@emkll
Copy link
Contributor

emkll commented Jan 20, 2020

I've run another test this morning based on the changes requested in freedomofpress/securedrop-client#701 (review). I have tested export (usb+print), reply, opening submissions), and all works as expected on that client version with the name change. One outstanding item that wasn't addressed in this PR was updated the DataFlow Diagram (https://github.com/freedomofpress/securedrop-workstation/blob/vm-rename-preferred-variant/docs/images/data-flow-diagram.png).

I will be performing the following tasks:

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 @eloquence, changes look good to me, based on testing/release checklist in #407 (comment). Every workstation will now need to make clean, make clone and make all to have these changes applied and be able to run SecureDrop Client 0.0.12+. Else they should pin 0.0.11 (not recommended). I have opened #408 to track the DFD update.

@emkll emkll merged commit 76b68a8 into master Jan 20, 2020
eloquence added a commit to freedomofpress/securedrop-builder that referenced this pull request Jan 20, 2020
cfm pushed a commit that referenced this pull request Apr 1, 2024
@legoktm legoktm deleted the vm-rename-preferred-variant 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.

Consider renaming VMs for clarity
2 participants