{"action":"closed","issue":{"url":"https://api.github.com/repos/alphagov/asset-manager/issues/545","repository_url":"https://api.github.com/repos/alphagov/asset-manager","labels_url":"https://api.github.com/repos/alphagov/asset-manager/issues/545/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/asset-manager/issues/545/comments","events_url":"https://api.github.com/repos/alphagov/asset-manager/issues/545/events","html_url":"https://github.com/alphagov/asset-manager/issues/545","id":311296002,"number":545,"title":"Ensure all AssetManager-related Sidekiq jobs in Whitehall are idempotent","user":{"login":"floehopper","id":3169,"avatar_url":"https://avatars2.githubusercontent.com/u/3169?v=4","gravatar_id":"","url":"https://api.github.com/users/floehopper","html_url":"https://github.com/floehopper","followers_url":"https://api.github.com/users/floehopper/followers","following_url":"https://api.github.com/users/floehopper/following{/other_user}","gists_url":"https://api.github.com/users/floehopper/gists{/gist_id}","starred_url":"https://api.github.com/users/floehopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floehopper/subscriptions","organizations_url":"https://api.github.com/users/floehopper/orgs","repos_url":"https://api.github.com/users/floehopper/repos","events_url":"https://api.github.com/users/floehopper/events{/privacy}","received_events_url":"https://api.github.com/users/floehopper/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/alphagov/asset-manager/milestones/7","html_url":"https://github.com/alphagov/asset-manager/milestone/7","labels_url":"https://api.github.com/repos/alphagov/asset-manager/milestones/7/labels","id":2810655,"number":7,"title":"Serve Whitehall attachment assets from Asset Manager","description":"We want Whitehall **attachments** to be saved to Asset Manager and for their public URL to be served by Asset Manager. The URLs should remain unchanged. This assumes we're already [serving Whitehall non-attachment assets from Asset Manager](https://github.com/alphagov/asset-manager/milestone/6).","creator":{"login":"floehopper","id":3169,"avatar_url":"https://avatars2.githubusercontent.com/u/3169?v=4","gravatar_id":"","url":"https://api.github.com/users/floehopper","html_url":"https://github.com/floehopper","followers_url":"https://api.github.com/users/floehopper/followers","following_url":"https://api.github.com/users/floehopper/following{/other_user}","gists_url":"https://api.github.com/users/floehopper/gists{/gist_id}","starred_url":"https://api.github.com/users/floehopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floehopper/subscriptions","organizations_url":"https://api.github.com/users/floehopper/orgs","repos_url":"https://api.github.com/users/floehopper/repos","events_url":"https://api.github.com/users/floehopper/events{/privacy}","received_events_url":"https://api.github.com/users/floehopper/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":40,"state":"open","created_at":"2017-10-03T14:36:17Z","updated_at":"2018-05-09T09:36:07Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-04-04T16:10:24Z","updated_at":"2018-05-09T09:36:07Z","closed_at":"2018-05-09T09:36:07Z","author_association":"CONTRIBUTOR","body":"As recommended in https://github.com/mperham/sidekiq/wiki/Best-Practices#2-make-your-job-idempotent-and-transactional. In particular the last sentence says:\r\n\r\n> Just remember that Sidekiq will execute your job **at least** once, not **exactly** once.\r\n\r\nThis last sentence is a bit ambiguous. In isolation it makes it sound as if the same job may run multiple times even if it's not retried. This might explain some behaviour that @chrislo & @chrisroos observed recently. However, if you read that sentence in the context of the rest of the paragraph, it sounds as if a job might only ever run once if no exceptions are raised.\r\n\r\nIn any case, we should ensure that all the jobs are idempotent to avoid this ever being a problem.\r\n"}}
{"actor":{"display_login":"thomasleese"}}