Update TallyPage to show one of 3 states (form; message that tallying is underway; election results).
Form should always show, so that a re-tally can be triggered.
STran | |
Mar 11 2021, 7:50 PM |
F34198872: successful_tally_unencrypted.png | |
Mar 31 2021, 8:40 AM |
F34198874: error_tally_invalid_gpg.png | |
Mar 31 2021, 8:40 AM |
F34183399: image.png | |
Mar 23 2021, 8:55 PM |
F34183401: image.png | |
Mar 23 2021, 8:55 PM |
F34183395: image.png | |
Mar 23 2021, 8:55 PM |
F34182686: image.png | |
Mar 23 2021, 3:19 PM |
F34173900: image.png | |
Mar 19 2021, 9:48 PM |
F34173887: image.png | |
Mar 19 2021, 9:48 PM |
Update TallyPage to show one of 3 states (form; message that tallying is underway; election results).
Form should always show, so that a re-tally can be triggered.
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
mediawiki/extensions/SecurePoll | master | +306 -13 | Tally elections via DeferredUpdate to avoid timeout |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T277226 Make Echo notification for when tallying is done | |||
Resolved | Tchanders | T277224 Check on TallyPage.php for tally results and display them | |||
Resolved | AGueyte | T277222 Create job to tally elections [M] | |||
Resolved | DLynch | T277221 Add getJSONMethod to ElectionTallier and Tallier and make getHTMLResult use it | |||
Duplicate | AGueyte | T277220 Add getJSONResult to SchulzeTallier and make getHTMLResult use it | |||
Duplicate | TThoabala | T277219 Add getJSONResult to HistorgramRangeTallier and make getHTMLResult use it | |||
Duplicate | wikitrent | T277216 Add getJSONResult to PluralityTallier and make getHTMLResult use it | |||
Resolved | phuedx | T288361 SecurePoll: Tallying an encrypted election on votewiki produces no results | |||
Resolved | STran | T288366 Add more logging to determine what happens to jobs in the wild | |||
Resolved | tstarling | T288711 /wiki/Special:SecurePoll/create Error: Call to a member function getId() on null |
Change 673601 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/SecurePoll@master] WIP Introduce job for tallying large encrypted elections
@Prtksxna The WIP patch uses the following workflow - would be great to hear your thoughts on both the workflow and the design
(Note that this is only for large encrypted elections; small elections and un-encrypted elections work as before.)
If the election has never been tallied before:
After submitting the tally form:
While the tally is ongoing:
Once the tally has finished:
If a tally has been completed, but another tally has been started since and is still ongoing:
@Prtksxna In case it's not clear, the results of this particular election are: "What do you like best One | 1026". This is roughly how tally results currently display.
This can definitely be improved, but it would be a significant bit of work to do that, since there are different types of election with different types of results data, so we'd need a design for each one. I'd suggest we do that as part of the next round of SecurePoll improvements.
@Tchanders, yep this is looking great, exactly what I had in mind. A few notes:
Could you share one page for unencrypted elections? I am guessing just a button in a fieldset is going to look a bit odd.
Do you think it is warranted to bring more attention to the 'alert'? If yes, we could use the yellow variant for it. If not, this is good.
Good point - have used the yellow 'warning' message. Also a red 'error' message if the tally has failed.
The GPG decryption key textarea would still be there, right?
Yes, it should always be there when needed.
Could you share one page for unencrypted elections? I am guessing just a button in a fieldset is going to look a bit odd.
Good point - the box is being added conditionally now, so not for the unencrypted elections.
Example screenshots (ignore the disappearing/reappearing encryption field):
Unencrypted election:
the box is being added conditionally now, so not for the unencrypted elections.
Perfect.
The example screenshots are looking good 👍🏾
Change 673601 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Tally elections via DeferredUpdate to avoid timeout
IMO this is fine, given I think all elections run with this tool have their results made public anyway.
beta votewiki wasn't letting me login for a couple of days (T263617), so I had to do most of my testing on docker. I successfully managed to tally an election with 1000 votes on docker, and 300 votes on beta.
Tested for encrypted elections of type Approval, Schulze, Plurality, Range Plurality and Range Histogram, one unencrypted election and an election which already had its decryption key uploaded.
Once the tallying job is complete, the results appear below the tallying form:
If the tallying job leads to an error, the error displays above the tally form, and stays there until the next time the election is successfully tallied:
As Thalia points out in the commit, the deferred tallying does not happen when uploading an XML dump:
The deferred update can't be used for elections that are uploaded via an XML dump since it is not clear where to return to for the results. The possibility of a timeout error therefore remains, if a user uploads a large election. However, this feature is rarely used and may be removed.
Test Environment: local docker (sqlite) SecurePoll 2.0.0 (ed8bc5e) 06:37, 29 March 2021.