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

Deprecate VxCentralScan's existing backup functionality in favor of "extended" CVR exports #4012

Merged
merged 12 commits into from
Oct 4, 2023

Conversation

arsalansufi
Copy link
Contributor

@arsalansufi arsalansufi commented Oct 2, 2023

Easiest reviewed by commit

Overview

Issue link: #3921 + #3922

This PR picks up where #4011 leaves off. It deprecates VxCentralScan's existing backup functionality in favor of "extended" CVR exports that contain images not only for accepted ballots but also rejected* ballots. It also by default has VxCentralScan export only the images that are absolutely necessary for tabulation (images for accepted ballots with write-ins).

Copying from that previous PR's description:

Summarizing, when all is said and done:

  1. VxScan continuous export will include images for all ballots, accepted and rejected
  2. VxScan "Save CVRs" button will include images for all ballots, accepted and rejected (same as 1)
  3. VxScan will no longer have a "Save Backup" button
  4. VxCentralScan "Save CVRs" button will include images for accepted ballots with write-ins
  5. VxCentralScan "Save Backup" button will include images for all ballots, accepted and rejected (same as 1 and 2)

This PR handles 4 and 5.

Caveat

*By "rejected" ballots, I mean interpretable rejected ballots. Tracking and exporting all rejected ballots, including ones that we couldn't interpret at all, will require some extra work. Today's backups also don't include these images, so we're not losing anything with this PR (Slack thread with some context).

Testing

  • Updated automated tests
  • Tested manually

Checklist

  • I have added logging where appropriate to any new user actions, system updates such as file reads or storage writes, or errors introduced Revisiting logging holistically in a follow-up PR

@arsalansufi arsalansufi force-pushed the arsalan/central-scan-backup branch 3 times, most recently from dfdb2e9 to 26a9efe Compare October 2, 2023 18:46
@@ -8,7 +8,6 @@ create table election (
polls_state text not null default "polls_closed_initial",
ballot_count_when_ballot_bag_last_replaced integer not null default 0,
is_sound_muted boolean not null default false,
cvrs_backed_up_at datetime,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This value and the corresponding setCvrsBackedUp and getCvrsBackupTimestamp values haven't been used in a while, as far as I can tell. scanner_backed_up_at, on the other hand, is still relevant

message: `Successfully saved CVR file with ${numberOfBallots} ballots.`,
disposition: 'success',
numberOfBallots,
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm revisiting logging holistically in a follow-up PR (leaning toward consolidating logging in app backends)

disposition: 'failure',
message: `Error saving ballot data backup: ${error.message}`,
result: 'No backup saved.',
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same comment here re logging

@arsalansufi arsalansufi requested a review from adghayes October 2, 2023 19:22
@arsalansufi arsalansufi marked this pull request as ready for review October 2, 2023 19:22
@arsalansufi arsalansufi requested a review from a team as a code owner October 2, 2023 19:22
@arsalansufi arsalansufi requested review from eventualbuddha and removed request for a team and eventualbuddha October 2, 2023 19:22
@arsalansufi arsalansufi force-pushed the arsalan/rejected-images branch from 81e4323 to 3856417 Compare October 2, 2023 21:19
@arsalansufi arsalansufi force-pushed the arsalan/central-scan-backup branch from b416d51 to d68f8d5 Compare October 2, 2023 21:22
row.finishedAdjudicationAt !== null ||
row.deletedAt !== null,
'Every sheet requiring review should have been either accepted or rejected'
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The VxCentralScan UX guarantees this - sheets requiring review have to be accepted or rejected before a batch is considered complete. And if someone shuts the machine down mid-adjudication, on boot, incomplete batches are cleaned up:

resolvedWorkspace.store.cleanupIncompleteBatches();

Copy link
Collaborator

Choose a reason for hiding this comment

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

We've discussed changing how central scan does adjudication - maybe add a comment with a bit of this explanation so that anyone changing this in the future sees the context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call! 0db5543

row.finishedAdjudicationAt !== null ||
row.deletedAt !== null,
'Every sheet requiring review should have been either accepted or rejected'
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We've discussed changing how central scan does adjudication - maybe add a comment with a bit of this explanation so that anyone changing this in the future sees the context?

Comment on lines -335 to -339
deprecatedApiRouter.post<
NoParams,
Scan.ExportToUsbDriveResponse,
Scan.ExportToUsbDriveRequest
>('/central-scanner/scan/export-to-usb-drive', async (_request, response) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Getting slightly closer to 100% grout, nice!

Base automatically changed from arsalan/rejected-images to main October 4, 2023 15:22
@arsalansufi arsalansufi force-pushed the arsalan/central-scan-backup branch from d68f8d5 to 0db5543 Compare October 4, 2023 15:24
@arsalansufi arsalansufi merged commit cdf1445 into main Oct 4, 2023
@arsalansufi arsalansufi deleted the arsalan/central-scan-backup branch October 4, 2023 15:33
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.

2 participants