{"action":"created","issue":{"url":"https://api.github.com/repos/heroku/heroku/issues/1605","labels_url":"https://api.github.com/repos/heroku/heroku/issues/1605/labels{/name}","comments_url":"https://api.github.com/repos/heroku/heroku/issues/1605/comments","events_url":"https://api.github.com/repos/heroku/heroku/issues/1605/events","html_url":"https://github.com/heroku/heroku/pull/1605","id":84863182,"number":1605,"title":"Identifying the cause of duplicate entries in `pg:info`","user":{"login":"chadbailey59","id":228358,"avatar_url":"https://avatars.githubusercontent.com/u/228358?v=3","gravatar_id":"","url":"https://api.github.com/users/chadbailey59","html_url":"https://github.com/chadbailey59","followers_url":"https://api.github.com/users/chadbailey59/followers","following_url":"https://api.github.com/users/chadbailey59/following{/other_user}","gists_url":"https://api.github.com/users/chadbailey59/gists{/gist_id}","starred_url":"https://api.github.com/users/chadbailey59/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadbailey59/subscriptions","organizations_url":"https://api.github.com/users/chadbailey59/orgs","repos_url":"https://api.github.com/users/chadbailey59/repos","events_url":"https://api.github.com/users/chadbailey59/events{/privacy}","received_events_url":"https://api.github.com/users/chadbailey59/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-06-04T02:07:37Z","updated_at":"2015-06-16T14:47:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/heroku/heroku/pulls/1605","html_url":"https://github.com/heroku/heroku/pull/1605","diff_url":"https://github.com/heroku/heroku/pull/1605.diff","patch_url":"https://github.com/heroku/heroku/pull/1605.patch"},"body":"Some customers have seen the same thing I've seen on my own app, where `DATABASE_URL` is set to `HEROKU_POSTGRESQL_COBALT_URL`:\r\n\r\n```\r\n~/Code/heroku (cb-database-url) ▸ be bin/heroku pg:info -a cb-rails3\r\n=== DATABASE_URL\r\nPlan:               Standard 0\r\nStatus:             Available\r\nData Size:          7.1 MB\r\nTables:             1\r\nPG Version:         9.3.5\r\nConnections:        2/120\r\nFork/Follow:        Available\r\nRollback:           earliest from 2015-06-04 01:01 UTC\r\nCreated:            2015-02-09 21:44 UTC\r\nForks:              HEROKU_POSTGRESQL_AQUA\r\nMaintenance:        not required\r\nMaintenance window: Thursdays 23:00 to Fridays 03:00 UTC\r\n\r\n=== HEROKU_POSTGRESQL_AQUA_URL\r\nPlan:               Standard 0\r\nStatus:             Available\r\nData Size:          7.1 MB\r\nTables:             0\r\nPG Version:         9.3.6\r\nConnections:        2/120\r\nFork/Follow:        Available\r\nRollback:           earliest from 2015-06-04 01:01 UTC\r\nCreated:            2015-04-08 16:00 UTC\r\nForked From:        HEROKU_POSTGRESQL_COBALT\r\nMaintenance:        not required\r\nMaintenance window: Tuesdays 19:30 to 23:30 UTC\r\n...\r\n=== HEROKU_POSTGRESQL_COBALT_URL\r\nPlan:               Standard 0\r\nStatus:             Available\r\nData Size:          7.1 MB\r\nTables:             1\r\nPG Version:         9.3.5\r\nConnections:        2/120\r\nFork/Follow:        Available\r\nRollback:           earliest from 2015-06-04 01:01 UTC\r\nCreated:            2015-02-09 21:44 UTC\r\nForks:              HEROKU_POSTGRESQL_AQUA\r\nMaintenance:        not required\r\nMaintenance window: Thursdays 23:00 to Fridays 03:00 UTC\r\n```\r\n\r\nWhich is to say, the same database is listed twice in the output: once under COBALT, and once under DATABASE. The expected behavior here is one entry, with a heading of `HEROKU_POSTGRESQL_COBALT_URL (DATABASE_URL)`.\r\n\r\nAs best I can tell, the dupe is coming back from the API. I was able to trace the difference in the spec and the real output back to the place I inserted those comments; in other words, `@hpg_databases`, which is lightly restructured data straight from the API, includes two different resources in the hash. They have different UUIDs but all the rest of the info is the same.\r\n\r\nI updated the spec to try to better represent the data coming back from the API. That said, I have no idea how best to fix it, or else I would have. :)\r\n\r\ncc @tef, and anyone else that I should add?"},"comment":{"url":"https://api.github.com/repos/heroku/heroku/issues/comments/112456656","html_url":"https://github.com/heroku/heroku/pull/1605#issuecomment-112456656","issue_url":"https://api.github.com/repos/heroku/heroku/issues/1605","id":112456656,"user":{"login":"neovintage","id":2482,"avatar_url":"https://avatars.githubusercontent.com/u/2482?v=3","gravatar_id":"","url":"https://api.github.com/users/neovintage","html_url":"https://github.com/neovintage","followers_url":"https://api.github.com/users/neovintage/followers","following_url":"https://api.github.com/users/neovintage/following{/other_user}","gists_url":"https://api.github.com/users/neovintage/gists{/gist_id}","starred_url":"https://api.github.com/users/neovintage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neovintage/subscriptions","organizations_url":"https://api.github.com/users/neovintage/orgs","repos_url":"https://api.github.com/users/neovintage/repos","events_url":"https://api.github.com/users/neovintage/events{/privacy}","received_events_url":"https://api.github.com/users/neovintage/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T14:47:51Z","updated_at":"2015-06-16T14:47:51Z","body":"@chadbailey59  What if we use original proposal at the bottom of the comment you made: https://github.com/heroku/heroku/pull/1605#issuecomment-108903496.  What I like about it is that we get rid of the DATABASE_URL in parenthesis and treat it like any other attachment name by including it in a comma separated list.  Also the help text change on `pg:promote` works too.\r\n\r\nWe will get to resource based naming but, as @bjeanes suggested, let's take a few baby steps to get there.  "}}