{"action":"opened","issue":{"url":"https://api.github.com/repos/koding/koding/issues/9373","repository_url":"https://api.github.com/repos/koding/koding","labels_url":"https://api.github.com/repos/koding/koding/issues/9373/labels{/name}","comments_url":"https://api.github.com/repos/koding/koding/issues/9373/comments","events_url":"https://api.github.com/repos/koding/koding/issues/9373/events","html_url":"https://github.com/koding/koding/issues/9373","id":184615791,"number":9373,"title":"terraformer: retry state sync / do not sync on plan","user":{"login":"rjeczalik","id":1162017,"avatar_url":"https://avatars.githubusercontent.com/u/1162017?v=3","gravatar_id":"","url":"https://api.github.com/users/rjeczalik","html_url":"https://github.com/rjeczalik","followers_url":"https://api.github.com/users/rjeczalik/followers","following_url":"https://api.github.com/users/rjeczalik/following{/other_user}","gists_url":"https://api.github.com/users/rjeczalik/gists{/gist_id}","starred_url":"https://api.github.com/users/rjeczalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjeczalik/subscriptions","organizations_url":"https://api.github.com/users/rjeczalik/orgs","repos_url":"https://api.github.com/users/rjeczalik/repos","events_url":"https://api.github.com/users/rjeczalik/events{/privacy}","received_events_url":"https://api.github.com/users/rjeczalik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/koding/koding/labels/A-Discussion","name":"A-Discussion","color":"bfd4f2"},{"url":"https://api.github.com/repos/koding/koding/labels/A-Feature","name":"A-Feature","color":"0e8a16"},{"url":"https://api.github.com/repos/koding/koding/labels/Category-Stacks","name":"Category-Stacks","color":"c2e0c6"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-22T07:34:54Z","updated_at":"2016-10-22T07:34:54Z","closed_at":null,"body":"In order to recover from potential rate limit errors we should:\r\n\r\n- retry Put / Get on 503 response\r\n- do not put state files to s3 on plan request\r\n\r\nIn the long run we can prefix state file S3 key with 3-4 character string, it should not be \"random\" as it should be possible for the team cleaner to read state files without issuing ListObject requests. I propose:\r\n\r\n```\r\nvar prefix := fmt.Sprintf(\"%c%c%c%c\", cred.Identifier[0], req.GroupName[0], cred.Identifier[1], req.GroupName[1])\r\n```\r\n\r\nThe cred.Identifier itself is a UUID so the prefix should be random enough (we expect the load generated by teams is evenly distributed, if not we'll cap the teams).\r\n\r\n/cc @ppknap "}}
{"actor":{"display_login":"rjeczalik"}}