{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/4628","repository_url":"https://api.github.com/repos/prometheus/prometheus","labels_url":"https://api.github.com/repos/prometheus/prometheus/issues/4628/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/4628/comments","events_url":"https://api.github.com/repos/prometheus/prometheus/issues/4628/events","html_url":"https://github.com/prometheus/prometheus/pull/4628","id":361454406,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2NDIxOTMx","number":4628,"title":"Make ErrStorage a concrete type not an interface","user":{"login":"bboreham","id":8125524,"node_id":"MDQ6VXNlcjgxMjU1MjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/8125524?v=4","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-09-18T19:43:52Z","updated_at":"2018-11-14T09:39:11Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/4628","html_url":"https://github.com/prometheus/prometheus/pull/4628","diff_url":"https://github.com/prometheus/prometheus/pull/4628.diff","patch_url":"https://github.com/prometheus/prometheus/pull/4628.patch"},"body":"Fixes #4629 \r\n\r\nSince it is [used in a type assertion](https://github.com/prometheus/prometheus/blob/3e87c04/web/api/v1/api.go#L265-L271), having `ErrStorage` as an alias to the error interface is the same as saying `error`, i.e. it succeeds for all types of error.  Change to a struct which is a concrete type and the type assertion will only succeed if the type is identical.\r\n\r\nhttps://golang.org/ref/spec#Type_assertions\r\n\r\nThis change will break downstream projects that are using the type, but I argue they can't be using it to any great benefit as it stands."},"comment":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/comments/438598974","html_url":"https://github.com/prometheus/prometheus/pull/4628#issuecomment-438598974","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/4628","id":438598974,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODU5ODk3NA==","user":{"login":"gouthamve","id":7354143,"node_id":"MDQ6VXNlcjczNTQxNDM=","avatar_url":"https://avatars0.githubusercontent.com/u/7354143?v=4","gravatar_id":"","url":"https://api.github.com/users/gouthamve","html_url":"https://github.com/gouthamve","followers_url":"https://api.github.com/users/gouthamve/followers","following_url":"https://api.github.com/users/gouthamve/following{/other_user}","gists_url":"https://api.github.com/users/gouthamve/gists{/gist_id}","starred_url":"https://api.github.com/users/gouthamve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gouthamve/subscriptions","organizations_url":"https://api.github.com/users/gouthamve/orgs","repos_url":"https://api.github.com/users/gouthamve/repos","events_url":"https://api.github.com/users/gouthamve/events{/privacy}","received_events_url":"https://api.github.com/users/gouthamve/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T09:39:11Z","updated_at":"2018-11-14T09:39:11Z","author_association":"MEMBER","body":"LGTM. I'll open another PR for the inconsistency. "}}
{"actor":{"display_login":"gouthamve"}}