Roundup Tracker - Issues

Issue 2551034

Title: REST etag ordering
Type: behavior Severity: normal
Components: Infrastructure Versions: devel
Status: open Resolution:
Dependencies: Superseder:
Assigned To: rouilj Nosy List: joseph_myers, rouilj
Priority: normal Keywords:

Created on 2019-03-19 00:26 by joseph_myers, last changed 2019-03-23 04:17 by rouilj.

msg6403 Author: [hidden] (joseph_myers) Date: 2019-03-19 00:26
The REST etag generation uses node.items(protected=True).  The order in
which properties appear in the result of node.items() is not necessarily
deterministic; it ends up depending on the ordering of dict keys, and
only in more recent Python 3 versions is dict guaranteed to preserve
insertion order.

I think sorting the result of items() should suffice to address this
issue (so repr(sorted(items)) (untested)).
msg6419 Author: [hidden] (rouilj) Date: 2019-03-23 04:17
Used sorted(items) as suggested and was able to restart the roundup
server under both python3 and python2 and get the same etag for an issue.

The etag would change on every server restart before.

I can't figure out how to test this though. I can't set the creation and
activity dates when creating the test case. Hence the etag is always
different since the data is different.
Date User Action Args
2019-03-23 04:17:11rouiljsetstatus: new -> open
assignee: rouilj
messages: + msg6419
nosy: + rouilj
2019-03-19 00:26:39joseph_myerscreate