{"action":"opened","issue":{"url":"https://api.github.com/repos/mesg-foundation/core/issues/618","repository_url":"https://api.github.com/repos/mesg-foundation/core","labels_url":"https://api.github.com/repos/mesg-foundation/core/issues/618/labels{/name}","comments_url":"https://api.github.com/repos/mesg-foundation/core/issues/618/comments","events_url":"https://api.github.com/repos/mesg-foundation/core/issues/618/events","html_url":"https://github.com/mesg-foundation/core/issues/618","id":387165196,"node_id":"MDU6SXNzdWUzODcxNjUxOTY=","number":618,"title":"Issue on service deletion with alias","user":{"login":"NicolasMahe","id":5823445,"node_id":"MDQ6VXNlcjU4MjM0NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/5823445?v=4","gravatar_id":"","url":"https://api.github.com/users/NicolasMahe","html_url":"https://github.com/NicolasMahe","followers_url":"https://api.github.com/users/NicolasMahe/followers","following_url":"https://api.github.com/users/NicolasMahe/following{/other_user}","gists_url":"https://api.github.com/users/NicolasMahe/gists{/gist_id}","starred_url":"https://api.github.com/users/NicolasMahe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicolasMahe/subscriptions","organizations_url":"https://api.github.com/users/NicolasMahe/orgs","repos_url":"https://api.github.com/users/NicolasMahe/repos","events_url":"https://api.github.com/users/NicolasMahe/events{/privacy}","received_events_url":"https://api.github.com/users/NicolasMahe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-04T08:09:42Z","updated_at":"2018-12-04T08:09:42Z","closed_at":null,"author_association":"MEMBER","body":"Here is a scenario that doesn't make sense:\r\n\r\n```\r\n➜  core git:(dev) ./dev-cli service deploy /Users/nico/Developments/MESG/services/service-bitcoin\r\n✔ Service context received with success\r\n✔ Image built with success\r\n✔ Service deployed with ID: d95a83b25b51be82c38ee793ed15614d08b5b51d\r\nTo start it, run the command:\r\n        mesg-core service start d95a83b25b51be82c38ee793ed15614d08b5b51d\r\n```\r\n```\r\n➜  core git:(dev) ./dev-cli service list\r\nID                                          ALIAS                                        NAME       STATUS\r\nd95a83b25b51be82c38ee793ed15614d08b5b51d    bitcoin                                      Bitcoin    stopped\r\n```\r\n\r\nI change something on the bitcoin service, then deploy again.\r\n```\r\n➜  core git:(dev) ./dev-cli service deploy /Users/nico/Developments/MESG/services/service-bitcoin\r\n✔ Service context received with success\r\n✔ Image built with success\r\n✔ Service deployed with ID: 06e0d1c14c142b58de2b1ded3bad63bd4fe02948\r\nTo start it, run the command:\r\n        mesg-core service start 06e0d1c14c142b58de2b1ded3bad63bd4fe02948\r\n```\r\n```\r\n➜  core git:(dev) ./dev-cli service list\r\nID                                          ALIAS                                        NAME       STATUS\r\nd95a83b25b51be82c38ee793ed15614d08b5b51d    bitcoin                                      Bitcoin    stopped\r\n06e0d1c14c142b58de2b1ded3bad63bd4fe02948    bitcoin                                      Bitcoin    stopped\r\n```\r\n```\r\n➜  core git:(dev) ./dev-cli service delete bitcoin\r\n✔ service \"bitcoin\" deleted\r\n```\r\n```\r\n➜  core git:(dev) ./dev-cli service list\r\nID                                          ALIAS                                        NAME       STATUS\r\nd95a83b25b51be82c38ee793ed15614d08b5b51d    bitcoin                                      Bitcoin    stopped\r\n```\r\n```\r\n➜  core git:(dev) ./dev-cli service delete bitcoin\r\n⨯ can't delete service \"bitcoin\": rpc error: code = Unknown desc = database: service bitcoin not found\r\nthere was a problem with deleting some services\r\nexit status 1\r\n```\r\n\r\n\r\n----\r\n\r\nAlias should be unique.\r\nFew ideas on how to solve it:\r\n- 1\r\nWhen deploying a new service, we should remove (generate?) the same alias from other service. The new problem is the old service (now with a different alias) cannot access its volumes (it will have new volumes)\r\n- 2\r\nWhen deploying a service where its alias already exist in the db, we should remove the old service (and of course ask user to confirm)\r\n\r\nI think idea 2 was the first implementation of anthony with the error \"same alias\".\r\n"}}
{"actor":{"display_login":"NicolasMahe"}}