{"action":"created","issue":{"url":"https://api.github.com/repos/snapcore/snapd/issues/5612","repository_url":"https://api.github.com/repos/snapcore/snapd","labels_url":"https://api.github.com/repos/snapcore/snapd/issues/5612/labels{/name}","comments_url":"https://api.github.com/repos/snapcore/snapd/issues/5612/comments","events_url":"https://api.github.com/repos/snapcore/snapd/issues/5612/events","html_url":"https://github.com/snapcore/snapd/pull/5612","id":348672679,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2OTY2MTk5","number":5612,"title":"[RFC] image: do simple seed.yaml snap sorting","user":{"login":"mvo5","id":914418,"node_id":"MDQ6VXNlcjkxNDQxOA==","avatar_url":"https://avatars3.githubusercontent.com/u/914418?v=4","gravatar_id":"","url":"https://api.github.com/users/mvo5","html_url":"https://github.com/mvo5","followers_url":"https://api.github.com/users/mvo5/followers","following_url":"https://api.github.com/users/mvo5/following{/other_user}","gists_url":"https://api.github.com/users/mvo5/gists{/gist_id}","starred_url":"https://api.github.com/users/mvo5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvo5/subscriptions","organizations_url":"https://api.github.com/users/mvo5/orgs","repos_url":"https://api.github.com/users/mvo5/repos","events_url":"https://api.github.com/users/mvo5/events{/privacy}","received_events_url":"https://api.github.com/users/mvo5/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-08T10:46:44Z","updated_at":"2018-08-15T09:17:55Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/5612","html_url":"https://github.com/snapcore/snapd/pull/5612","diff_url":"https://github.com/snapcore/snapd/pull/5612.diff","patch_url":"https://github.com/snapcore/snapd/pull/5612.patch"},"body":"We ran into some issues with projects that had the order in the\r\nseed.yaml wrong. I.e. installing snaps that require content\r\nproviders before the content provider. This PR adds a very simple\r\nsorting for seed.yaml:\r\n\r\n1. base/core,kernel,gadget,\"snapd\" are never reordered\r\n2. other bases\r\n3. snaps that provide any content interface slot\r\n4. other snaps\r\n\r\nIt will also warn if any of the content provider themself use a\r\ncontent plug that this nees manual resolving.\r\n\r\nThe above sorting should be fine because:\r\n- we order the boot base/core/gadget/kernel manually already\r\n  so (1) should be fine\r\n- bases can not depend on bases so (2) should be fine\r\n- snaps that provide content must go before snaps that use content,\r\n  this is why we have (3)\r\n- then remaining snaps have any needed bases or content providers\r\n  installed at this point\r\n\r\nOne caveat for (3) is of course any snaps that both provide and\r\nrequire content. This case is not handled just warned about.\r\n\r\nIf the basic approach sounds sane I will add a bunch more tests. If we\r\ndecide to use a different (e.g. full topsort) approach I won't bother spending\r\nmore time on this :)"},"comment":{"url":"https://api.github.com/repos/snapcore/snapd/issues/comments/413141463","html_url":"https://github.com/snapcore/snapd/pull/5612#issuecomment-413141463","issue_url":"https://api.github.com/repos/snapcore/snapd/issues/5612","id":413141463,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzE0MTQ2Mw==","user":{"login":"pedronis","id":975757,"node_id":"MDQ6VXNlcjk3NTc1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/975757?v=4","gravatar_id":"","url":"https://api.github.com/users/pedronis","html_url":"https://github.com/pedronis","followers_url":"https://api.github.com/users/pedronis/followers","following_url":"https://api.github.com/users/pedronis/following{/other_user}","gists_url":"https://api.github.com/users/pedronis/gists{/gist_id}","starred_url":"https://api.github.com/users/pedronis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedronis/subscriptions","organizations_url":"https://api.github.com/users/pedronis/orgs","repos_url":"https://api.github.com/users/pedronis/repos","events_url":"https://api.github.com/users/pedronis/events{/privacy}","received_events_url":"https://api.github.com/users/pedronis/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T09:17:55Z","updated_at":"2018-08-15T09:17:55Z","author_association":"CONTRIBUTOR","body":"notice that the actual bug happened with something that wasn't created with prepare-image so we need to do the sorting at first boot, not strictly here, we can do both of course as well\r\n\r\nthere warning doesn't help though, so we do need topsort"}}
{"actor":{"display_login":"pedronis"}}