{"action":"created","issue":{"url":"https://api.github.com/repos/yunojuno/heroku-tools/issues/10","repository_url":"https://api.github.com/repos/yunojuno/heroku-tools","labels_url":"https://api.github.com/repos/yunojuno/heroku-tools/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/yunojuno/heroku-tools/issues/10/comments","events_url":"https://api.github.com/repos/yunojuno/heroku-tools/issues/10/events","html_url":"https://github.com/yunojuno/heroku-tools/issues/10","id":187782484,"number":10,"title":"Call to run migrations does not take into account sibling deployments in a pipeline","user":{"login":"stevejalim","id":101457,"avatar_url":"https://avatars.githubusercontent.com/u/101457?v=3","gravatar_id":"","url":"https://api.github.com/users/stevejalim","html_url":"https://github.com/stevejalim","followers_url":"https://api.github.com/users/stevejalim/followers","following_url":"https://api.github.com/users/stevejalim/following{/other_user}","gists_url":"https://api.github.com/users/stevejalim/gists{/gist_id}","starred_url":"https://api.github.com/users/stevejalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevejalim/subscriptions","organizations_url":"https://api.github.com/users/stevejalim/orgs","repos_url":"https://api.github.com/users/stevejalim/repos","events_url":"https://api.github.com/users/stevejalim/events{/privacy}","received_events_url":"https://api.github.com/users/stevejalim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-07T17:57:38Z","updated_at":"2016-11-23T15:23:50Z","closed_at":null,"body":"If you have more than one app in a pipeline's target node, only the one nominated in the `.herokutoolsconf` file will have its migrations run.\r\n\r\n\r\nie, in  \r\n\r\n```\r\n                /------- [FOO]\r\n[UAT] ----------\r\n                \\------- [BAR]\r\n```\r\n\r\nif FOO is referenced in the conf, it has its migrations run, but BAR is ignored.\r\n\r\nSuggestions\r\n\r\n1) always run migrations - ie, use the buildpack defaults\r\n\r\n2) use the Heroku API to get the pipleine target app names and pass that to the migration-running code "},"comment":{"url":"https://api.github.com/repos/yunojuno/heroku-tools/issues/comments/262544746","html_url":"https://github.com/yunojuno/heroku-tools/issues/10#issuecomment-262544746","issue_url":"https://api.github.com/repos/yunojuno/heroku-tools/issues/10","id":262544746,"user":{"login":"stevejalim","id":101457,"avatar_url":"https://avatars.githubusercontent.com/u/101457?v=3","gravatar_id":"","url":"https://api.github.com/users/stevejalim","html_url":"https://github.com/stevejalim","followers_url":"https://api.github.com/users/stevejalim/followers","following_url":"https://api.github.com/users/stevejalim/following{/other_user}","gists_url":"https://api.github.com/users/stevejalim/gists{/gist_id}","starred_url":"https://api.github.com/users/stevejalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevejalim/subscriptions","organizations_url":"https://api.github.com/users/stevejalim/orgs","repos_url":"https://api.github.com/users/stevejalim/repos","events_url":"https://api.github.com/users/stevejalim/events{/privacy}","received_events_url":"https://api.github.com/users/stevejalim/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T15:23:50Z","updated_at":"2016-11-23T15:23:50Z","body":"Looking into this more, I was mistaken re the buildpack - https://github.com/heroku/heroku-buildpack-python does not appear to include support for running migrations by default, only `collectstatic`.\r\n\r\nI can make `heroku-tools` always run migrations, but that doesn't change the fact that it will only run them on the main app nominated in the configuration file -- it won't do any siblings in the pipeline.\r\n\r\nSo, two more suggestions:\r\n\r\n1) Create a buildpack which does run migrations (and drop migration support from heroku-tools to save redundant work -- but this may not well serve all users of the proj)\r\n\r\n2) Use the Heroku API to [get the relevant platform data](https://devcenter.heroku.com/articles/pipelines-using-the-platform-api) and run the migration command on all the relevant apps in that stage\r\n\r\n"}}
{"actor":{"display_login":"stevejalim"}}