{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/6216","repository_url":"https://api.github.com/repos/influxdata/influxdb","labels_url":"https://api.github.com/repos/influxdata/influxdb/issues/6216/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/influxdb/issues/6216/comments","events_url":"https://api.github.com/repos/influxdata/influxdb/issues/6216/events","html_url":"https://github.com/influxdata/influxdb/pull/6216","id":145981631,"number":6216,"title":"Change protobuf package names to avoid clashes","user":{"login":"e-dard","id":501993,"avatar_url":"https://avatars.githubusercontent.com/u/501993?v=3","gravatar_id":"","url":"https://api.github.com/users/e-dard","html_url":"https://github.com/e-dard","followers_url":"https://api.github.com/users/e-dard/followers","following_url":"https://api.github.com/users/e-dard/following{/other_user}","gists_url":"https://api.github.com/users/e-dard/gists{/gist_id}","starred_url":"https://api.github.com/users/e-dard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e-dard/subscriptions","organizations_url":"https://api.github.com/users/e-dard/orgs","repos_url":"https://api.github.com/users/e-dard/repos","events_url":"https://api.github.com/users/e-dard/events{/privacy}","received_events_url":"https://api.github.com/users/e-dard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/influxdata/influxdb/labels/category/internal","name":"category/internal","color":"f6fb20"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/influxdata/influxdb/milestones/51","html_url":"https://github.com/influxdata/influxdb/milestones/0.13.0","labels_url":"https://api.github.com/repos/influxdata/influxdb/milestones/51/labels","id":1657496,"number":51,"title":"0.13.0","description":"","creator":{"login":"jwilder","id":219935,"avatar_url":"https://avatars.githubusercontent.com/u/219935?v=3","gravatar_id":"","url":"https://api.github.com/users/jwilder","html_url":"https://github.com/jwilder","followers_url":"https://api.github.com/users/jwilder/followers","following_url":"https://api.github.com/users/jwilder/following{/other_user}","gists_url":"https://api.github.com/users/jwilder/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilder/subscriptions","organizations_url":"https://api.github.com/users/jwilder/orgs","repos_url":"https://api.github.com/users/jwilder/repos","events_url":"https://api.github.com/users/jwilder/events{/privacy}","received_events_url":"https://api.github.com/users/jwilder/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":0,"state":"open","created_at":"2016-03-21T14:55:36Z","updated_at":"2016-04-05T15:04:01Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-04-05T13:02:14Z","updated_at":"2016-04-05T15:04:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/influxdata/influxdb/pulls/6216","html_url":"https://github.com/influxdata/influxdb/pull/6216","diff_url":"https://github.com/influxdata/influxdb/pull/6216.diff","patch_url":"https://github.com/influxdata/influxdb/pull/6216.patch"},"body":"###### Required for all non-trivial PRs\r\n- [x] Rebased/mergable\r\n- [ ] Tests pass\r\n- [ ] CHANGELOG.md updated\r\n- [x] Sign [CLA](https://influxdata.com/community/cla/) (if not already signed)\r\n\r\nFixes #6211.\r\n\r\n> For the following description `pb-package` refers to the `package foo` declaration at the top of a protofbuf package, and `package` refers to a Go package.\r\n\r\nEvery `pb-package` in influx is named `internal`. This is fine if none of the definitions are duplicated anywhere, but it's now the case that they are (`IteratorStats` appears in the `cluster` proto spec and the `influxql` proto spec.\r\n\r\nI think it would be better if `pb-packages` were separate from each other, so we don't get clashes like this. A simple way to do this, while allowing us to still consistently refer to the generated types as `internal.Foo` is to use an `internal` alias in front of the import definition. \r\n\r\nCommit  dfee15b fixed #6211 and prevents any further clash, but I think we should just scope all of the `pb-packages` appropriately, so _none_ are referred to as `internal`, then we just do, for example: \r\n\r\n```go\r\nimport (\r\n        internal \"github.com/influxdata/influxdb/tsdb/internal\"\r\n)\r\n```\r\n\r\nand we can continue to refer to all the generated types as, e.g., `internal.MeasurementFields` even though they're defined in the generated internal package `tsdb` and not `internal`. I've updated the other packages in 184257a.\r\n\r\n/cc @corylanou @benbjohnson since you've both had to fiddle with protobuf clashes at one point or another I think!"},"comment":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/comments/205848154","html_url":"https://github.com/influxdata/influxdb/pull/6216#issuecomment-205848154","issue_url":"https://api.github.com/repos/influxdata/influxdb/issues/6216","id":205848154,"user":{"login":"jsternberg","id":1212129,"avatar_url":"https://avatars.githubusercontent.com/u/1212129?v=3","gravatar_id":"","url":"https://api.github.com/users/jsternberg","html_url":"https://github.com/jsternberg","followers_url":"https://api.github.com/users/jsternberg/followers","following_url":"https://api.github.com/users/jsternberg/following{/other_user}","gists_url":"https://api.github.com/users/jsternberg/gists{/gist_id}","starred_url":"https://api.github.com/users/jsternberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsternberg/subscriptions","organizations_url":"https://api.github.com/users/jsternberg/orgs","repos_url":"https://api.github.com/users/jsternberg/repos","events_url":"https://api.github.com/users/jsternberg/events{/privacy}","received_events_url":"https://api.github.com/users/jsternberg/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T15:04:12Z","updated_at":"2016-04-05T15:04:12Z","body":"I like continuing to use the `cluster` package personally since I think of the internal package as a part of the parent. I also think the error messages will be more clear, but it's not that big of a deal.\r\n\r\n@e-dard we likely need to merge something to fix the name clash decently soon since this currently causes an error message to be printed when starting the application from master."}}