{"action":"created","issue":{"url":"https://api.github.com/repos/wtsi-hgi/cookie-monster/issues/3","labels_url":"https://api.github.com/repos/wtsi-hgi/cookie-monster/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/wtsi-hgi/cookie-monster/issues/3/comments","events_url":"https://api.github.com/repos/wtsi-hgi/cookie-monster/issues/3/events","html_url":"https://github.com/wtsi-hgi/cookie-monster/issues/3","id":124951373,"number":3,"title":"Multiple calls to `enrich_cookie` for the same cookie after retrieve","user":{"login":"colin-nolan","id":1138107,"avatar_url":"https://avatars.githubusercontent.com/u/1138107?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-nolan","html_url":"https://github.com/colin-nolan","followers_url":"https://api.github.com/users/colin-nolan/followers","following_url":"https://api.github.com/users/colin-nolan/following{/other_user}","gists_url":"https://api.github.com/users/colin-nolan/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-nolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-nolan/subscriptions","organizations_url":"https://api.github.com/users/colin-nolan/orgs","repos_url":"https://api.github.com/users/colin-nolan/repos","events_url":"https://api.github.com/users/colin-nolan/events{/privacy}","received_events_url":"https://api.github.com/users/colin-nolan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wtsi-hgi/cookie-monster/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-05T11:52:49Z","updated_at":"2016-01-05T12:52:36Z","closed_at":null,"body":"Retrieving updates from iRODS can return multiple updates that relate to the same entity, e.g. if many metadata operations occur, you get a separate `Update` for each. These updates cannot be merged (at least not with are current `Update` model) without throwing away timestamps.\r\n\r\nThe problem is that when an update about an entity is given to `CookieJar` via the `enrich_cookie` method, `CookieJar` flags it as dirty straight away and processing will begin. However, a moment later, another update may be fed in about the same cookie: it is marked as dirty and is processed yet again. Therefore, the same cookie may be processed any number of times after a single retrieve.\r\n"},"comment":{"url":"https://api.github.com/repos/wtsi-hgi/cookie-monster/issues/comments/168990856","html_url":"https://github.com/wtsi-hgi/cookie-monster/issues/3#issuecomment-168990856","issue_url":"https://api.github.com/repos/wtsi-hgi/cookie-monster/issues/3","id":168990856,"user":{"login":"colin-nolan","id":1138107,"avatar_url":"https://avatars.githubusercontent.com/u/1138107?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-nolan","html_url":"https://github.com/colin-nolan","followers_url":"https://api.github.com/users/colin-nolan/followers","following_url":"https://api.github.com/users/colin-nolan/following{/other_user}","gists_url":"https://api.github.com/users/colin-nolan/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-nolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-nolan/subscriptions","organizations_url":"https://api.github.com/users/colin-nolan/orgs","repos_url":"https://api.github.com/users/colin-nolan/repos","events_url":"https://api.github.com/users/colin-nolan/events{/privacy}","received_events_url":"https://api.github.com/users/colin-nolan/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T12:52:36Z","updated_at":"2016-01-05T12:52:36Z","body":"I agree: I shall just keep the latest."}}