{"action":"created","comment":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/comments/239392393","pull_request_review_id":182160478,"id":239392393,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTM5MjM5Mw==","diff_hunk":"@@ -411,3 +411,59 @@ apps:\n \tc.Check(log.String(), testutil.Contains, `cannot regenerate BROKEN profile for snap \"test-snapd-canary\": cannot setup security profile`)\n \tc.Check(osutil.FileExists(dirs.SnapSystemKeyFile), Equals, false)\n }\n+\n+func (s *helpersSuite) TestIsHotplugChange(c *C) {\n+\ts.st.Lock()\n+\tdefer s.st.Unlock()\n+\n+\tchg := s.st.NewChange(\"foo\", \"\")","path":"overlord/ifacestate/helpers_test.go","position":9,"original_position":9,"commit_id":"9dce6604b6947f4883845433ea238ba686b2fbac","original_commit_id":"9dce6604b6947f4883845433ea238ba686b2fbac","user":{"login":"bboozzoo","id":41870,"node_id":"MDQ6VXNlcjQxODcw","avatar_url":"https://avatars3.githubusercontent.com/u/41870?v=4","gravatar_id":"","url":"https://api.github.com/users/bboozzoo","html_url":"https://github.com/bboozzoo","followers_url":"https://api.github.com/users/bboozzoo/followers","following_url":"https://api.github.com/users/bboozzoo/following{/other_user}","gists_url":"https://api.github.com/users/bboozzoo/gists{/gist_id}","starred_url":"https://api.github.com/users/bboozzoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboozzoo/subscriptions","organizations_url":"https://api.github.com/users/bboozzoo/orgs","repos_url":"https://api.github.com/users/bboozzoo/repos","events_url":"https://api.github.com/users/bboozzoo/events{/privacy}","received_events_url":"https://api.github.com/users/bboozzoo/received_events","type":"User","site_admin":false},"body":"Can you also add a test like this:\r\n```\r\n\tchg := s.st.NewChange(\"hotplugfoo\", \"\")\r\n\tc.Assert(ifacestate.IsHotplugChange(chg), Equals, false)\r\n```","created_at":"2018-12-06T10:04:17Z","updated_at":"2018-12-06T10:07:55Z","html_url":"https://github.com/snapcore/snapd/pull/6268#discussion_r239392393","pull_request_url":"https://api.github.com/repos/snapcore/snapd/pulls/6268","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments/239392393"},"html":{"href":"https://github.com/snapcore/snapd/pull/6268#discussion_r239392393"},"pull_request":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/6268"}}},"pull_request":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/6268","id":236228954,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2MjI4OTU0","html_url":"https://github.com/snapcore/snapd/pull/6268","diff_url":"https://github.com/snapcore/snapd/pull/6268.diff","patch_url":"https://github.com/snapcore/snapd/pull/6268.patch","issue_url":"https://api.github.com/repos/snapcore/snapd/issues/6268","number":6268,"state":"open","locked":false,"title":"overlord/ifacestate: helpers for serializing hotplug changes","user":{"login":"stolowski","id":168604,"node_id":"MDQ6VXNlcjE2ODYwNA==","avatar_url":"https://avatars0.githubusercontent.com/u/168604?v=4","gravatar_id":"","url":"https://api.github.com/users/stolowski","html_url":"https://github.com/stolowski","followers_url":"https://api.github.com/users/stolowski/followers","following_url":"https://api.github.com/users/stolowski/following{/other_user}","gists_url":"https://api.github.com/users/stolowski/gists{/gist_id}","starred_url":"https://api.github.com/users/stolowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stolowski/subscriptions","organizations_url":"https://api.github.com/users/stolowski/orgs","repos_url":"https://api.github.com/users/stolowski/repos","events_url":"https://api.github.com/users/stolowski/events{/privacy}","received_events_url":"https://api.github.com/users/stolowski/received_events","type":"User","site_admin":false},"body":"Implementation of helpers for serializing hotplug-related changes affecting same device. The general idea is to control the order of task exection by maintaining a sequence number:\r\n- all tasks related to given hotplug event are added to a `hotplug-...` change.\r\n- the change has `hotplug-key` (that identifies a device) and `hotplug-seq` value that gets increased every time as new changes are created. Current value of this counter is remembered in state.\r\n- a special task (`hotplug-sequence-wait`) is added to the same change, before actual tasks. This task looks into all currently running hotplug changes and returns `Retry` error if there is another change with a lower sequence number for same hotplug key.","created_at":"2018-12-05T16:01:18Z","updated_at":"2018-12-06T10:07:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3607b09be06d602dc9c0f5f8728d8ca225196ab2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1026148731,"node_id":"MDU6TGFiZWwxMDI2MTQ4NzMx","url":"https://api.github.com/repos/snapcore/snapd/labels/Hotplug%20%F0%9F%94%8C","name":"Hotplug 🔌","color":"ecef8b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/snapcore/snapd/pulls/6268/commits","review_comments_url":"https://api.github.com/repos/snapcore/snapd/pulls/6268/comments","review_comment_url":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snapcore/snapd/issues/6268/comments","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/9dce6604b6947f4883845433ea238ba686b2fbac","head":{"label":"stolowski:hotplug-sequence","ref":"hotplug-sequence","sha":"9dce6604b6947f4883845433ea238ba686b2fbac","user":{"login":"stolowski","id":168604,"node_id":"MDQ6VXNlcjE2ODYwNA==","avatar_url":"https://avatars0.githubusercontent.com/u/168604?v=4","gravatar_id":"","url":"https://api.github.com/users/stolowski","html_url":"https://github.com/stolowski","followers_url":"https://api.github.com/users/stolowski/followers","following_url":"https://api.github.com/users/stolowski/following{/other_user}","gists_url":"https://api.github.com/users/stolowski/gists{/gist_id}","starred_url":"https://api.github.com/users/stolowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stolowski/subscriptions","organizations_url":"https://api.github.com/users/stolowski/orgs","repos_url":"https://api.github.com/users/stolowski/repos","events_url":"https://api.github.com/users/stolowski/events{/privacy}","received_events_url":"https://api.github.com/users/stolowski/received_events","type":"User","site_admin":false},"repo":{"id":66472850,"node_id":"MDEwOlJlcG9zaXRvcnk2NjQ3Mjg1MA==","name":"snapd","full_name":"stolowski/snapd","private":false,"owner":{"login":"stolowski","id":168604,"node_id":"MDQ6VXNlcjE2ODYwNA==","avatar_url":"https://avatars0.githubusercontent.com/u/168604?v=4","gravatar_id":"","url":"https://api.github.com/users/stolowski","html_url":"https://github.com/stolowski","followers_url":"https://api.github.com/users/stolowski/followers","following_url":"https://api.github.com/users/stolowski/following{/other_user}","gists_url":"https://api.github.com/users/stolowski/gists{/gist_id}","starred_url":"https://api.github.com/users/stolowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stolowski/subscriptions","organizations_url":"https://api.github.com/users/stolowski/orgs","repos_url":"https://api.github.com/users/stolowski/repos","events_url":"https://api.github.com/users/stolowski/events{/privacy}","received_events_url":"https://api.github.com/users/stolowski/received_events","type":"User","site_admin":false},"html_url":"https://github.com/stolowski/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":true,"url":"https://api.github.com/repos/stolowski/snapd","forks_url":"https://api.github.com/repos/stolowski/snapd/forks","keys_url":"https://api.github.com/repos/stolowski/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stolowski/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stolowski/snapd/teams","hooks_url":"https://api.github.com/repos/stolowski/snapd/hooks","issue_events_url":"https://api.github.com/repos/stolowski/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/stolowski/snapd/events","assignees_url":"https://api.github.com/repos/stolowski/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/stolowski/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/stolowski/snapd/tags","blobs_url":"https://api.github.com/repos/stolowski/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stolowski/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stolowski/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/stolowski/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stolowski/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/stolowski/snapd/languages","stargazers_url":"https://api.github.com/repos/stolowski/snapd/stargazers","contributors_url":"https://api.github.com/repos/stolowski/snapd/contributors","subscribers_url":"https://api.github.com/repos/stolowski/snapd/subscribers","subscription_url":"https://api.github.com/repos/stolowski/snapd/subscription","commits_url":"https://api.github.com/repos/stolowski/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/stolowski/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/stolowski/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/stolowski/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/stolowski/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/stolowski/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stolowski/snapd/merges","archive_url":"https://api.github.com/repos/stolowski/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stolowski/snapd/downloads","issues_url":"https://api.github.com/repos/stolowski/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/stolowski/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/stolowski/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/stolowski/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stolowski/snapd/labels{/name}","releases_url":"https://api.github.com/repos/stolowski/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/stolowski/snapd/deployments","created_at":"2016-08-24T14:50:18Z","updated_at":"2016-08-24T14:50:21Z","pushed_at":"2018-12-06T09:17:42Z","git_url":"git://github.com/stolowski/snapd.git","ssh_url":"git@github.com:stolowski/snapd.git","clone_url":"https://github.com/stolowski/snapd.git","svn_url":"https://github.com/stolowski/snapd","homepage":"","size":77601,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"snapcore:master","ref":"master","sha":"622bbf36f8b8a7341e6d5fa19e4440d4dd0bdad4","user":{"login":"snapcore","id":19532717,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTMyNzE3","avatar_url":"https://avatars1.githubusercontent.com/u/19532717?v=4","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"repo":{"id":44672744,"node_id":"MDEwOlJlcG9zaXRvcnk0NDY3Mjc0NA==","name":"snapd","full_name":"snapcore/snapd","private":false,"owner":{"login":"snapcore","id":19532717,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTMyNzE3","avatar_url":"https://avatars1.githubusercontent.com/u/19532717?v=4","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/snapcore/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":false,"url":"https://api.github.com/repos/snapcore/snapd","forks_url":"https://api.github.com/repos/snapcore/snapd/forks","keys_url":"https://api.github.com/repos/snapcore/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snapcore/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snapcore/snapd/teams","hooks_url":"https://api.github.com/repos/snapcore/snapd/hooks","issue_events_url":"https://api.github.com/repos/snapcore/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/snapcore/snapd/events","assignees_url":"https://api.github.com/repos/snapcore/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/snapcore/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/snapcore/snapd/tags","blobs_url":"https://api.github.com/repos/snapcore/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snapcore/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snapcore/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/snapcore/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/snapcore/snapd/languages","stargazers_url":"https://api.github.com/repos/snapcore/snapd/stargazers","contributors_url":"https://api.github.com/repos/snapcore/snapd/contributors","subscribers_url":"https://api.github.com/repos/snapcore/snapd/subscribers","subscription_url":"https://api.github.com/repos/snapcore/snapd/subscription","commits_url":"https://api.github.com/repos/snapcore/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/snapcore/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/snapcore/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/snapcore/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/snapcore/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/snapcore/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snapcore/snapd/merges","archive_url":"https://api.github.com/repos/snapcore/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snapcore/snapd/downloads","issues_url":"https://api.github.com/repos/snapcore/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/snapcore/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/snapcore/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/snapcore/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snapcore/snapd/labels{/name}","releases_url":"https://api.github.com/repos/snapcore/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/snapcore/snapd/deployments","created_at":"2015-10-21T11:51:46Z","updated_at":"2018-12-05T21:09:16Z","pushed_at":"2018-12-06T09:17:45Z","git_url":"git://github.com/snapcore/snapd.git","ssh_url":"git@github.com:snapcore/snapd.git","clone_url":"https://github.com/snapcore/snapd.git","svn_url":"https://github.com/snapcore/snapd","homepage":"","size":76425,"stargazers_count":1051,"watchers_count":1051,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":264,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":264,"open_issues":39,"watchers":1051,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/6268"},"html":{"href":"https://github.com/snapcore/snapd/pull/6268"},"issue":{"href":"https://api.github.com/repos/snapcore/snapd/issues/6268"},"comments":{"href":"https://api.github.com/repos/snapcore/snapd/issues/6268/comments"},"review_comments":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/6268/comments"},"review_comment":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/6268/commits"},"statuses":{"href":"https://api.github.com/repos/snapcore/snapd/statuses/9dce6604b6947f4883845433ea238ba686b2fbac"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bboozzoo"}}