{"action":"created","comment":{"url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments/61630719","id":61630719,"diff_hunk":"@@ -157,11 +163,21 @@ func (s *Info) DataDir() string {\n \treturn filepath.Join(dirs.SnapDataDir, s.Name(), s.strRevno())\n }\n \n+// CommonDataDir returns the data directory common between versions of the snap.\n+func (s *Info) CommonDataDir() string {\n+\treturn filepath.Join(dirs.SnapDataDir, s.Name(), \"common\")\n+}\n+\n // DataHomeDir returns the per user data directory of the snap.\n func (s *Info) DataHomeDir() string {\n \treturn filepath.Join(dirs.SnapDataHomeGlob, s.Name(), s.strRevno())\n }\n \n+// CommonDataHomeDir returns the per user data directory common between versions of the snap.\n+func (s *Info) CommonDataHomeDir() string {","path":"snap/info.go","position":null,"original_position":30,"commit_id":"4cc6ea571e9425d347dda71f19dce7d59e2ec4d8","original_commit_id":"1d4ee867cf93020664b02bca25dfbf594e44b661","user":{"login":"kyrofa","id":946674,"avatar_url":"https://avatars.githubusercontent.com/u/946674?v=3","gravatar_id":"","url":"https://api.github.com/users/kyrofa","html_url":"https://github.com/kyrofa","followers_url":"https://api.github.com/users/kyrofa/followers","following_url":"https://api.github.com/users/kyrofa/following{/other_user}","gists_url":"https://api.github.com/users/kyrofa/gists{/gist_id}","starred_url":"https://api.github.com/users/kyrofa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyrofa/subscriptions","organizations_url":"https://api.github.com/users/kyrofa/orgs","repos_url":"https://api.github.com/users/kyrofa/repos","events_url":"https://api.github.com/users/kyrofa/events{/privacy}","received_events_url":"https://api.github.com/users/kyrofa/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2016-04-29T19:11:49Z","updated_at":"2016-04-29T19:11:49Z","html_url":"https://github.com/ubuntu-core/snappy/pull/1095#discussion_r61630719","pull_request_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/1095","_links":{"self":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments/61630719"},"html":{"href":"https://github.com/ubuntu-core/snappy/pull/1095#discussion_r61630719"},"pull_request":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/1095"}}},"pull_request":{"url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/1095","id":68265714,"html_url":"https://github.com/ubuntu-core/snappy/pull/1095","diff_url":"https://github.com/ubuntu-core/snappy/pull/1095.diff","patch_url":"https://github.com/ubuntu-core/snappy/pull/1095.patch","issue_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/1095","number":1095,"state":"open","locked":false,"title":"interfaces,overlord: support unversioned data","user":{"login":"kyrofa","id":946674,"avatar_url":"https://avatars.githubusercontent.com/u/946674?v=3","gravatar_id":"","url":"https://api.github.com/users/kyrofa","html_url":"https://github.com/kyrofa","followers_url":"https://api.github.com/users/kyrofa/followers","following_url":"https://api.github.com/users/kyrofa/following{/other_user}","gists_url":"https://api.github.com/users/kyrofa/gists{/gist_id}","starred_url":"https://api.github.com/users/kyrofa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyrofa/subscriptions","organizations_url":"https://api.github.com/users/kyrofa/orgs","repos_url":"https://api.github.com/users/kyrofa/repos","events_url":"https://api.github.com/users/kyrofa/events{/privacy}","received_events_url":"https://api.github.com/users/kyrofa/received_events","type":"User","site_admin":false},"body":"The current versioned data directories are an important aspect of the upgrade/rollback strategy, but they don't scale well for applications that need to hold a vast amount of non-version-specific data (LP: [#1559248](https://bugs.launchpad.net/snappy/+bug/1559248)). This PR is an attempt to implement support for unversioned data (i.e. data that is shared between versions of a given snap), conforming to [Jamie's suggestion][2] (note that the naming is of course up for discussion). The shared directories are removed by overlord only once the final version is removed.\r\n\r\nNote that this will also require changes to `ubuntu-core-launcher` to create the user-specific shared data directory (as it creates the versioned data directory). That can come once this PR is approved.\r\n\r\n[2]: https://lists.ubuntu.com/archives/snappy-devel/2016-January/001451.html","created_at":"2016-04-28T18:14:14Z","updated_at":"2016-04-29T19:11:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f31f8e30a68bba4dc8d3cbfbf24787e34efd731d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/1095/commits","review_comments_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/1095/comments","review_comment_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/1095/comments","statuses_url":"https://api.github.com/repos/ubuntu-core/snappy/statuses/4cc6ea571e9425d347dda71f19dce7d59e2ec4d8","head":{"label":"kyrofa:feature/1559248/unversioned_data","ref":"feature/1559248/unversioned_data","sha":"4cc6ea571e9425d347dda71f19dce7d59e2ec4d8","user":{"login":"kyrofa","id":946674,"avatar_url":"https://avatars.githubusercontent.com/u/946674?v=3","gravatar_id":"","url":"https://api.github.com/users/kyrofa","html_url":"https://github.com/kyrofa","followers_url":"https://api.github.com/users/kyrofa/followers","following_url":"https://api.github.com/users/kyrofa/following{/other_user}","gists_url":"https://api.github.com/users/kyrofa/gists{/gist_id}","starred_url":"https://api.github.com/users/kyrofa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyrofa/subscriptions","organizations_url":"https://api.github.com/users/kyrofa/orgs","repos_url":"https://api.github.com/users/kyrofa/repos","events_url":"https://api.github.com/users/kyrofa/events{/privacy}","received_events_url":"https://api.github.com/users/kyrofa/received_events","type":"User","site_admin":false},"repo":{"id":48129328,"name":"snappy","full_name":"kyrofa/snappy","owner":{"login":"kyrofa","id":946674,"avatar_url":"https://avatars.githubusercontent.com/u/946674?v=3","gravatar_id":"","url":"https://api.github.com/users/kyrofa","html_url":"https://github.com/kyrofa","followers_url":"https://api.github.com/users/kyrofa/followers","following_url":"https://api.github.com/users/kyrofa/following{/other_user}","gists_url":"https://api.github.com/users/kyrofa/gists{/gist_id}","starred_url":"https://api.github.com/users/kyrofa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyrofa/subscriptions","organizations_url":"https://api.github.com/users/kyrofa/orgs","repos_url":"https://api.github.com/users/kyrofa/repos","events_url":"https://api.github.com/users/kyrofa/events{/privacy}","received_events_url":"https://api.github.com/users/kyrofa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kyrofa/snappy","description":"Snappy is the software at the heart of Ubuntu Core.","fork":true,"url":"https://api.github.com/repos/kyrofa/snappy","forks_url":"https://api.github.com/repos/kyrofa/snappy/forks","keys_url":"https://api.github.com/repos/kyrofa/snappy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kyrofa/snappy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kyrofa/snappy/teams","hooks_url":"https://api.github.com/repos/kyrofa/snappy/hooks","issue_events_url":"https://api.github.com/repos/kyrofa/snappy/issues/events{/number}","events_url":"https://api.github.com/repos/kyrofa/snappy/events","assignees_url":"https://api.github.com/repos/kyrofa/snappy/assignees{/user}","branches_url":"https://api.github.com/repos/kyrofa/snappy/branches{/branch}","tags_url":"https://api.github.com/repos/kyrofa/snappy/tags","blobs_url":"https://api.github.com/repos/kyrofa/snappy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kyrofa/snappy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kyrofa/snappy/git/refs{/sha}","trees_url":"https://api.github.com/repos/kyrofa/snappy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kyrofa/snappy/statuses/{sha}","languages_url":"https://api.github.com/repos/kyrofa/snappy/languages","stargazers_url":"https://api.github.com/repos/kyrofa/snappy/stargazers","contributors_url":"https://api.github.com/repos/kyrofa/snappy/contributors","subscribers_url":"https://api.github.com/repos/kyrofa/snappy/subscribers","subscription_url":"https://api.github.com/repos/kyrofa/snappy/subscription","commits_url":"https://api.github.com/repos/kyrofa/snappy/commits{/sha}","git_commits_url":"https://api.github.com/repos/kyrofa/snappy/git/commits{/sha}","comments_url":"https://api.github.com/repos/kyrofa/snappy/comments{/number}","issue_comment_url":"https://api.github.com/repos/kyrofa/snappy/issues/comments{/number}","contents_url":"https://api.github.com/repos/kyrofa/snappy/contents/{+path}","compare_url":"https://api.github.com/repos/kyrofa/snappy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kyrofa/snappy/merges","archive_url":"https://api.github.com/repos/kyrofa/snappy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kyrofa/snappy/downloads","issues_url":"https://api.github.com/repos/kyrofa/snappy/issues{/number}","pulls_url":"https://api.github.com/repos/kyrofa/snappy/pulls{/number}","milestones_url":"https://api.github.com/repos/kyrofa/snappy/milestones{/number}","notifications_url":"https://api.github.com/repos/kyrofa/snappy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kyrofa/snappy/labels{/name}","releases_url":"https://api.github.com/repos/kyrofa/snappy/releases{/id}","deployments_url":"https://api.github.com/repos/kyrofa/snappy/deployments","created_at":"2015-12-16T19:02:43Z","updated_at":"2016-04-27T21:06:42Z","pushed_at":"2016-04-29T19:11:21Z","git_url":"git://github.com/kyrofa/snappy.git","ssh_url":"git@github.com:kyrofa/snappy.git","clone_url":"https://github.com/kyrofa/snappy.git","svn_url":"https://github.com/kyrofa/snappy","homepage":null,"size":29187,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ubuntu-core:master","ref":"master","sha":"e34e863840d996c2cbaf232dc4b874d982cdcb29","user":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"repo":{"id":44672744,"name":"snappy","full_name":"ubuntu-core/snappy","owner":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubuntu-core/snappy","description":"Snappy is the software at the heart of Ubuntu Core.","fork":false,"url":"https://api.github.com/repos/ubuntu-core/snappy","forks_url":"https://api.github.com/repos/ubuntu-core/snappy/forks","keys_url":"https://api.github.com/repos/ubuntu-core/snappy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubuntu-core/snappy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubuntu-core/snappy/teams","hooks_url":"https://api.github.com/repos/ubuntu-core/snappy/hooks","issue_events_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/events{/number}","events_url":"https://api.github.com/repos/ubuntu-core/snappy/events","assignees_url":"https://api.github.com/repos/ubuntu-core/snappy/assignees{/user}","branches_url":"https://api.github.com/repos/ubuntu-core/snappy/branches{/branch}","tags_url":"https://api.github.com/repos/ubuntu-core/snappy/tags","blobs_url":"https://api.github.com/repos/ubuntu-core/snappy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubuntu-core/snappy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubuntu-core/snappy/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubuntu-core/snappy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubuntu-core/snappy/statuses/{sha}","languages_url":"https://api.github.com/repos/ubuntu-core/snappy/languages","stargazers_url":"https://api.github.com/repos/ubuntu-core/snappy/stargazers","contributors_url":"https://api.github.com/repos/ubuntu-core/snappy/contributors","subscribers_url":"https://api.github.com/repos/ubuntu-core/snappy/subscribers","subscription_url":"https://api.github.com/repos/ubuntu-core/snappy/subscription","commits_url":"https://api.github.com/repos/ubuntu-core/snappy/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubuntu-core/snappy/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubuntu-core/snappy/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubuntu-core/snappy/contents/{+path}","compare_url":"https://api.github.com/repos/ubuntu-core/snappy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubuntu-core/snappy/merges","archive_url":"https://api.github.com/repos/ubuntu-core/snappy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubuntu-core/snappy/downloads","issues_url":"https://api.github.com/repos/ubuntu-core/snappy/issues{/number}","pulls_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls{/number}","milestones_url":"https://api.github.com/repos/ubuntu-core/snappy/milestones{/number}","notifications_url":"https://api.github.com/repos/ubuntu-core/snappy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubuntu-core/snappy/labels{/name}","releases_url":"https://api.github.com/repos/ubuntu-core/snappy/releases{/id}","deployments_url":"https://api.github.com/repos/ubuntu-core/snappy/deployments","created_at":"2015-10-21T11:51:46Z","updated_at":"2016-04-28T22:16:42Z","pushed_at":"2016-04-29T19:11:21Z","git_url":"git://github.com/ubuntu-core/snappy.git","ssh_url":"git@github.com:ubuntu-core/snappy.git","clone_url":"https://github.com/ubuntu-core/snappy.git","svn_url":"https://github.com/ubuntu-core/snappy","homepage":null,"size":30340,"stargazers_count":180,"watchers_count":180,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":12,"forks":39,"open_issues":12,"watchers":180,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/1095"},"html":{"href":"https://github.com/ubuntu-core/snappy/pull/1095"},"issue":{"href":"https://api.github.com/repos/ubuntu-core/snappy/issues/1095"},"comments":{"href":"https://api.github.com/repos/ubuntu-core/snappy/issues/1095/comments"},"review_comments":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/1095/comments"},"review_comment":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/1095/commits"},"statuses":{"href":"https://api.github.com/repos/ubuntu-core/snappy/statuses/4cc6ea571e9425d347dda71f19dce7d59e2ec4d8"}}}}