Mercurial > p > roundup > code
view doc/acknowledgements.txt @ 5710:0b79bfcb3312
Add support for making an idempotent POST. This allows retrying a POST
that was interrupted. It involves creating a post once only (poe) url
/rest/data/<class>/@poe/<random_token>. This url acts the same as a
post to /rest/data/<class>. However once the @poe url is used, it
can't be used for a second POST.
To make these changes:
1) Take the body of post_collection into a new post_collection_inner
function. Have post_collection call post_collection_inner.
2) Add a handler for POST to rest/data/class/@poe. This will return a
unique POE url. By default the url expires after 30 minutes. The
POE random token is only good for a specific user and is stored in
the session db.
3) Add a handler for POST to rest/data/<class>/@poe/<random token>.
The random token generated in 2 is validated for proper class (if
token is not generic) and proper user and must not have expired.
If everything is valid, call post_collection_inner to process the
input and generate the new entry.
To make recognition of 2 stable (so it's not confused with
rest/data/<:class_name>/<:item_id>), removed @ from
Routing::url_to_regex.
The current Routing.execute method stops on the first regular
expression to match the URL. Since item_id doesn't accept a POST, I
was getting 405 bad method sometimes. My guess is the order of the
regular expressions is not stable, so sometime I would get the right
regexp for /data/<class>/@poe and sometime I would get the one for
/data/<class>/<item_id>. By removing the @ from the url_to_regexp,
there was no way for the item_id case to match @poe.
There are alternate fixes we may need to look at. If a regexp matches
but the method does not, return to the regexp matching loop in
execute() looking for another match. Only once every possible match
has failed should the code return a 405 method failure.
Another fix is to implement a more sophisticated mechanism so that
@Routing.route("/data/<:class_name>/<:item_id>/<:attr_name>", 'PATCH')
has different regexps for matching <:class_name> <:item_id> and
<:attr_name>. Currently the regexp specified by url_to_regex is used
for every component.
Other fixes:
Made failure to find any props in props_from_args return an empty
dict rather than throwing an unhandled error.
Make __init__ for SimulateFieldStorageFromJson handle an empty json
doc. Useful for POSTing to rest/data/class/@poe with an empty
document.
Testing:
added testPostPOE to test/rest_common.py that I think covers
all the code that was added.
Documentation:
Add doc to rest.txt in the "Client API" section titled: Safely
Re-sending POST". Move existing section "Adding new rest endpoints" in
"Client API" to a new second level section called "Programming the
REST API". Also a minor change to the simple rest client moving the
header setting to continuation lines rather than showing one long
line.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 14 Apr 2019 21:07:11 -0400 |
| parents | 33f8bb777659 |
| children | 167ef847fcdf |
line wrap: on
line source
Acknowledgements ================ The Roundup Initative is a group of people that regularily works together to produce new releases of the Roundup Issue Tracker. We like to thank our community and all organisation and people that support us doing so with code, money, time, testing, reports, ideas and everything else that helped! `Announcement with changelog for current release.`_ .. _`Announcement with changelog for current release.`: announcement.html 1.6 --- 1.6.0 ~~~~~ Maintainer: Ralf Schlatterbeck, John Rouillard Release Manager: John Rouillard Developer activity by changesets:: rouilj at ieee.org 234 ********************************************** rsc at runtux.com 30 ****** john at jerrykan.com 26 ***** bernhard at intevation.de 10 ** esr at thyrsus.com 8 ** techtonik at gmail.com 5 * dangchau1991 at gmail.com 1 pf at artcom-gmbh.de 1 thomas at intevation.de 1 Frank Niessink, Anthony (antmail), Bruce Tulloch, kinggreedy, David Wolever, Tom Ekberg, Peter Funk, Daniel Diniz, W. Trevor King, Igor Ippolitov, Joseph Myers, r.david.murray, martin.v.loewis, Henry (henryl), David Wolever, Stuart McGraw (smcgraw), Philipp Gortan (mephinet), Ezio Melotti, Heiko Stegmann, Trent Gamblin, Anton Schur 1.5 --- 1.5.1 ~~~~~ Maintainer: Ralf Schlatterbeck Release Manager: Anatoly Techtonik Developer activity by changesets:: hg churn -c --rev 1.5.0:1.5.1 techtonik@gmail.com 98 ********************************************** bernhard@intevation.de 44 ********************* Bernhard Reiter rsc@runtux.com 37 ***************** Ralf Schlatterbeck john@jerrykan.com 26 ************ John Kristensen thomas@intevation.de 22 ********** Thomas Arendsen Hein rouilj@ieee.org 5 ** John P. Rouillard caulagi@gmail.com 2 * Pradip Caulagi ced@b2ck.com 1 Cédric Krier Mathias Behrle, Ezio Melotti, R David Murray, James Mack, Thibault Fevry, Kai Storbeck, Kay Hayen, Karl-Philipp Richter 1.5.0 ~~~~~ Maintainer: Ralf Schlatterbeck:: hg churn -c --rev 1.4.21:1.5.0 techtonik@gmail.com 37 ********************************************** Anatoly Techtonik bernhard@intevation.de 17 ********************* Bernhard Reiter caulagi@gmail.com 16 ******************** Pradip Caulagi rouilj@ieee.org 8 ********** John P. Rouillard rsc@runtux.com 6 ******* Ralf Schlatterbeck thomas@intevation.de 5 ****** Thomas Arendsen Hein Tom Ekberg, Erik Hanspers pre 1.5.0 --------- Go Ping, you rock! Also, go Common Ground, ekit.com and Bizar Software for letting me implement this system on their time. Thanks also to the many people on the mailing list, in the sourceforge project and those who just report bugs: Christian Aastorp, Thomas Arendsen Hein, Nerijus Baliunas, Benni Bärmann, Anthony Baxter, David Benjamin, Marlon van den Berg, Bo Berglund, Olly Betts, Stéphane Bidoul, Rafal Bisingier, Cameron Blackwood, Jeff Blaine, Duncan Booth, Seb Brezel, J Alan Brogan, Titus Brown, Steve Byan, Brett Cannon, Godefroid Chapelle, Pradip Caulagi, Eli Collins, Roch'e Compaan, Wil Cooley, Joe Cooper, Kelley Dagley, Bruno Damour, Bradley Dean, Toby Dickenson, Paul F. Dubois, Hauke Duden, Eric Earnst, Peter Eisentraut, Andrew Eland, Jeff Epler, Tom Epperly, Tamer Fahmy, Thibault Févry, Vickenty Fesunov, Hernan Martinez Foffani, Trent Gamblin, Stuart D. Gathman, Martin Geisler, Ajit George, Dirk Geschke, Frank Gibbons, Johannes Gijsbers, Christian Glass, Gus Gollings, Philipp Gortan, Dan Grassi, Robin Green, Jason Grout, Charles Groves, Engelbert Gruber, Bruce Guenter, Tamás Gulácsi, Satchidanand Haridas, Sebastian Harl, Ralf Hemmecke, Juergen Hermann, Tobias Herp, Uwe Hoffmann, Alex Holkner, Tobias Hunger, Werner Hunger, Simon Hyde, Paul Jimenez, Christophe Kalt, Timo Kankare, Brian Kelley, James Kew, Sheila King, Michael Klatt, Bastian Kleineidam, Axel Kollmorgen, Cédric Krier, John Kristensen, Detlef Lannert, Andrey Lebedev, Henrik Levkowetz, David Linke, Martin v. Löwis, Fredrik Lundh, Jochen Maes, Will Maier, Ksenia Marasanova, Georges Martin, Gordon McMillan, Christof Meerwald, John F Meinel Jr, Roland Meister, Ezio Melotti, Ulrik Mikaelsson, John Mitchell, Ramiro Morales, Toni Mueller, Joseph Myers, Chau Nguyen, Stefan Niederhauser, Truls E. Næss, Bryce L Nordgren, Patrick Ohly, "om", Luke Opperman, Anthony Pankov, Eddie Parker, Will Partain, Timo Paulssen, Benjamin Pollack, Peter Pöml, Ewout Prangsma, Marcus Priesch, Eric S. Raymond, Bernhard Reiter, Roy Rapoport, John P. Rouillard, Luke Ross, Jesse Ruderman, Ollie Rutherfurd, Toby Sargeant, Giuseppe Scelsi, Ralf Schlatterbeck, Gregor Schmid, Florian Schulze, Klamer Schutte, Dougal Scott, Stefan Seefeld, Jouni K Seppänen, Jeffrey P Shell, Dan Shidlovsky, Joel Shprentz, Terrel Shumway, Emil Sit, Alexander Smishlajev, Nathaniel Smith, Leonardo Soto, Maciej Starzyk, Heiko Stegmann, Kai Storbeck, Mitchell Surface, anatoly techtonik, Jon C. Thomason, Mike Thompson, Hubert Touvet, Michael Twomey, Joseph E. Trent, Karl Ulbrich, Martin Uzak, Darryl VanDorp, J Vickroy, Timothy J. Warren, Jakub Wilk, William (Wilk), Tue Wennerberg, Matt Wilbert, Chris Withers, David Wolever, Cheer Xiao, Milan Zamazal.
