{"action":"created","issue":{"url":"https://api.github.com/repos/twitter-fabric/galley/issues/35","repository_url":"https://api.github.com/repos/twitter-fabric/galley","labels_url":"https://api.github.com/repos/twitter-fabric/galley/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/twitter-fabric/galley/issues/35/comments","events_url":"https://api.github.com/repos/twitter-fabric/galley/issues/35/events","html_url":"https://github.com/twitter-fabric/galley/issues/35","id":130753358,"number":35,"title":"Stateful containers are recreated when they are launched directly","user":{"login":"davidgiesberg","id":102163,"avatar_url":"https://avatars.githubusercontent.com/u/102163?v=3","gravatar_id":"","url":"https://api.github.com/users/davidgiesberg","html_url":"https://github.com/davidgiesberg","followers_url":"https://api.github.com/users/davidgiesberg/followers","following_url":"https://api.github.com/users/davidgiesberg/following{/other_user}","gists_url":"https://api.github.com/users/davidgiesberg/gists{/gist_id}","starred_url":"https://api.github.com/users/davidgiesberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidgiesberg/subscriptions","organizations_url":"https://api.github.com/users/davidgiesberg/orgs","repos_url":"https://api.github.com/users/davidgiesberg/repos","events_url":"https://api.github.com/users/davidgiesberg/events{/privacy}","received_events_url":"https://api.github.com/users/davidgiesberg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-02T17:25:46Z","updated_at":"2016-02-02T18:26:25Z","closed_at":null,"body":"I'm seeing a behavior that doesn't seem to line up with how I _expect_ galley to behave.\r\n\r\n**Expectation**\r\n\r\nSetting a service to be stateful should mean that the _only_ time it gets nuked is when I explicitly tell galley to do so (with `unprotectStateful` and the like)\r\n\r\n**Observation**\r\n\r\n`database` is a stateful service that is a dependency of `app`:\r\n\r\n    $ galley run app.dev\r\n    database: Checking… not found. Creating… done! Starting… done!\r\n    app: Checking… not found. Creating… done! Starting… done!\r\n\r\nMake some changes so `database`'s state has changed\r\n\r\n    $ galley run database.dev\r\n    database: Checking… needs recreate Removing… done! Creating… done! Starting… done!\r\n\r\nNow, `database`'s state has been lost, when I was just expecting it to relaunch in the foreground.\r\n\r\nPR is en route"},"comment":{"url":"https://api.github.com/repos/twitter-fabric/galley/issues/comments/178739853","html_url":"https://github.com/twitter-fabric/galley/issues/35#issuecomment-178739853","issue_url":"https://api.github.com/repos/twitter-fabric/galley/issues/35","id":178739853,"user":{"login":"phopkins","id":260837,"avatar_url":"https://avatars.githubusercontent.com/u/260837?v=3","gravatar_id":"","url":"https://api.github.com/users/phopkins","html_url":"https://github.com/phopkins","followers_url":"https://api.github.com/users/phopkins/followers","following_url":"https://api.github.com/users/phopkins/following{/other_user}","gists_url":"https://api.github.com/users/phopkins/gists{/gist_id}","starred_url":"https://api.github.com/users/phopkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phopkins/subscriptions","organizations_url":"https://api.github.com/users/phopkins/orgs","repos_url":"https://api.github.com/users/phopkins/repos","events_url":"https://api.github.com/users/phopkins/events{/privacy}","received_events_url":"https://api.github.com/users/phopkins/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T18:26:25Z","updated_at":"2016-02-02T18:26:25Z","body":"Left some comments on #36. I think it's ok to redefine stateful to not recreate even when it's primary, though I worry that that imposes some significant limitations on how well Galley can get it in a good state for you. It may be better to tweak things so that you don't typically want to run stateful containers as primary."}}