{"action":"created","issue":{"url":"https://api.github.com/repos/tidepool-org/chrome-uploader/issues/275","repository_url":"https://api.github.com/repos/tidepool-org/chrome-uploader","labels_url":"https://api.github.com/repos/tidepool-org/chrome-uploader/issues/275/labels{/name}","comments_url":"https://api.github.com/repos/tidepool-org/chrome-uploader/issues/275/comments","events_url":"https://api.github.com/repos/tidepool-org/chrome-uploader/issues/275/events","html_url":"https://github.com/tidepool-org/chrome-uploader/pull/275","id":149598644,"number":275,"title":"make sure log index of 0 gets passed through for bootstrapping","user":{"login":"jebeck","id":1588547,"avatar_url":"https://avatars.githubusercontent.com/u/1588547?v=3","gravatar_id":"","url":"https://api.github.com/users/jebeck","html_url":"https://github.com/jebeck","followers_url":"https://api.github.com/users/jebeck/followers","following_url":"https://api.github.com/users/jebeck/following{/other_user}","gists_url":"https://api.github.com/users/jebeck/gists{/gist_id}","starred_url":"https://api.github.com/users/jebeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jebeck/subscriptions","organizations_url":"https://api.github.com/users/jebeck/orgs","repos_url":"https://api.github.com/users/jebeck/repos","events_url":"https://api.github.com/users/jebeck/events{/privacy}","received_events_url":"https://api.github.com/users/jebeck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-19T22:12:58Z","updated_at":"2016-04-19T22:13:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tidepool-org/chrome-uploader/pulls/275","html_url":"https://github.com/tidepool-org/chrome-uploader/pull/275","diff_url":"https://github.com/tidepool-org/chrome-uploader/pull/275.diff","patch_url":"https://github.com/tidepool-org/chrome-uploader/pull/275.patch"},"body":"I believe this is the root issue of the fix being attempted in #273 \r\n\r\nHow I got here: when I started looking at @gniezen's changes, the first thing I noticed was that they were in an `else` clause that should very rarely be triggered - for situations when we **don't** have the log index for sequencing. In OmniPod this only happens with some alarms that are not \"history\" records with normal log indices. The uploader was actually already logging the object that failed to have its UTC info looked up (although it wasn't super clear that that's *what* was being logged - another change I made here was to add some more text to that debug message to clarify). When I looked at the logged object causing the lookup failure it was NOT an alarm at all, and it had an index (of `0`). So then the hunt was to figure out why that index wasn't getting passed through, and shamefully truthiness was to blame /o\\\r\n\r\nI think the logic here is correct, but I'm definitely open to suggestions re: better way to \"phrase\" it for readability/understandability. We should also try to see if we can add a regression test if I don't get to that by the end of today."},"comment":{"url":"https://api.github.com/repos/tidepool-org/chrome-uploader/issues/comments/212150279","html_url":"https://github.com/tidepool-org/chrome-uploader/pull/275#issuecomment-212150279","issue_url":"https://api.github.com/repos/tidepool-org/chrome-uploader/issues/275","id":212150279,"user":{"login":"jebeck","id":1588547,"avatar_url":"https://avatars.githubusercontent.com/u/1588547?v=3","gravatar_id":"","url":"https://api.github.com/users/jebeck","html_url":"https://github.com/jebeck","followers_url":"https://api.github.com/users/jebeck/followers","following_url":"https://api.github.com/users/jebeck/following{/other_user}","gists_url":"https://api.github.com/users/jebeck/gists{/gist_id}","starred_url":"https://api.github.com/users/jebeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jebeck/subscriptions","organizations_url":"https://api.github.com/users/jebeck/orgs","repos_url":"https://api.github.com/users/jebeck/repos","events_url":"https://api.github.com/users/jebeck/events{/privacy}","received_events_url":"https://api.github.com/users/jebeck/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T22:13:28Z","updated_at":"2016-04-19T22:13:28Z","body":"<a href=\"https:&#x2F;&#x2F;trello.com&#x2F;c&#x2F;TfVVfeqA&#x2F;34-uploader-bug-omnipod-failed-to-look-up-utc-info-error\"><img src=\"https:&#x2F;&#x2F;github.trello.services&#x2F;images&#x2F;trello-icon.png\" width=\"12\" height=\"12\"> [uploader] Bug: OmniPod  `Failed to look up UTC info!` error</a>"}}