{"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju/pulls/comments/80807710","pull_request_review_id":1836546,"id":80807710,"diff_hunk":"@@ -975,7 +1001,7 @@ func (s *Application) Refresh() error {\n \t\treturn errors.NotFoundf(\"application %q\", s)\n \t}\n \tif err != nil {\n-\t\treturn fmt.Errorf(\"cannot refresh application %q: %v\", s, err)\n+\t\treturn errors.Errorf(\"cannot refresh application %q: %v\", s, err)","path":"state/application.go","position":403,"original_position":403,"commit_id":"448e8ca8d2c854ee4dfd4468af20d32ed1ac8b15","original_commit_id":"448e8ca8d2c854ee4dfd4468af20d32ed1ac8b15","user":{"login":"mjs","id":14993,"avatar_url":"https://avatars.githubusercontent.com/u/14993?v=3","gravatar_id":"","url":"https://api.github.com/users/mjs","html_url":"https://github.com/mjs","followers_url":"https://api.github.com/users/mjs/followers","following_url":"https://api.github.com/users/mjs/following{/other_user}","gists_url":"https://api.github.com/users/mjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjs/subscriptions","organizations_url":"https://api.github.com/users/mjs/orgs","repos_url":"https://api.github.com/users/mjs/repos","events_url":"https://api.github.com/users/mjs/events{/privacy}","received_events_url":"https://api.github.com/users/mjs/received_events","type":"User","site_admin":false},"body":"thanks for updating all these","created_at":"2016-09-27T22:13:20Z","updated_at":"2016-09-27T22:16:01Z","html_url":"https://github.com/juju/juju/pull/6313#discussion_r80807710","pull_request_url":"https://api.github.com/repos/juju/juju/pulls/6313","_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/80807710"},"html":{"href":"https://github.com/juju/juju/pull/6313#discussion_r80807710"},"pull_request":{"href":"https://api.github.com/repos/juju/juju/pulls/6313"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/6313","id":86462574,"html_url":"https://github.com/juju/juju/pull/6313","diff_url":"https://github.com/juju/juju/pull/6313.diff","patch_url":"https://github.com/juju/juju/pull/6313.patch","issue_url":"https://api.github.com/repos/juju/juju/issues/6313","number":6313,"state":"open","locked":false,"title":"state: update storage constraints and config in SetCharm","user":{"login":"axw","id":843579,"avatar_url":"https://avatars.githubusercontent.com/u/843579?v=3","gravatar_id":"","url":"https://api.github.com/users/axw","html_url":"https://github.com/axw","followers_url":"https://api.github.com/users/axw/followers","following_url":"https://api.github.com/users/axw/following{/other_user}","gists_url":"https://api.github.com/users/axw/gists{/gist_id}","starred_url":"https://api.github.com/users/axw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axw/subscriptions","organizations_url":"https://api.github.com/users/axw/orgs","repos_url":"https://api.github.com/users/axw/repos","events_url":"https://api.github.com/users/axw/events{/privacy}","received_events_url":"https://api.github.com/users/axw/received_events","type":"User","site_admin":false},"body":"Application.SetCharm now supports updating\r\nstorage constraints and charm config settings\r\nat the same time as updating an application's\r\ncharm.\r\n\r\nBecause you can now specify constraints for\r\nnew stores added to a charm, we relax the\r\nrules around changes to a charm's stores. If\r\na new required store is added, we will add\r\nmax(min-count, constraint-count) instances\r\nto each unit, where min-count is the minimum\r\ncount specified in the charm metadata, and\r\nconstraint-count is the user-specified count,\r\nif any. If constraint-count < min-count, we\r\nwill return an error explaining that the\r\nconstraints do not satisfy the requirements.\r\n\r\nThe minimum count for existing stores may\r\nalso be changed now. If any unit does not\r\nalready have enough storage instances to\r\nsatisfy this requirement, new instances will\r\nbe added so long as the storage constraints\r\nallow it.\r\n\r\nIf config is specified, we take the existing\r\nsettings, and delete any keys that are no\r\nlonger defined by the charm's config; we\r\nthen add the user-specified settings.\r\n\r\n**QA**\r\n\r\n(With https://github.com/juju/juju/pull/6312)\r\n\r\n1. bootstrap and deploy a charm with a\r\n   single optional store, with count=1\r\n2. modify the charm to make said store\r\n   required, with a minimum count of 2;\r\n   and add another store with a minimum\r\n   count of 3\r\n3. upgrade-charm to said charm, without\r\n   specifying --storage. Observe that it\r\n   fails because the existing store's\r\n   constraints (count=1) do not satisfy\r\n   the new minimum (count>=2).\r\n4. upgrade-charm to said charm, with\r\n   --storage existing-store=2, but without\r\n   specifying anything for the new store.\r\n   This will succeed; there will be an\r\n   additional storage instance for the\r\n   existing store, and three instances\r\n   for the new store with the default\r\n   storage constraints.\r\n5. Do-over, but this time with --storage for the new store also, specifying new-storage=4. Observe that the user-specified constraints are used for the new store, and four instances are created.\r\n6. deploy a charm with one string config setting \"foo\".\r\n7. remove \"foo\" from the charm, and add \"bar\". Upgrade to it without specifying any --config on the command line. We should have the existing behaviour: \"foo\" is removed, and the default value for \"bar\" is added.\r\n8. add \"foo\" back to the charm, and remove \"bar\". Upgrade to it, but this time specify --config on the command line, pointing at a file that contains a non-default value for \"foo\". The application should have the value for \"foo\" taken from the config file, and \"bar\" removed.\r\n9. change the value for \"foo\" in the config file, add a value for \"bar\", and run the upgrade again. This should fail, as there is no \"bar\" config defined by the charm. Application config should not have changed.\r\n  ","created_at":"2016-09-23T06:57:53Z","updated_at":"2016-09-27T22:16:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf37fe1af0bf3adb759c14c1c06781d8e212ff1b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju/pulls/6313/commits","review_comments_url":"https://api.github.com/repos/juju/juju/pulls/6313/comments","review_comment_url":"https://api.github.com/repos/juju/juju/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/juju/issues/6313/comments","statuses_url":"https://api.github.com/repos/juju/juju/statuses/448e8ca8d2c854ee4dfd4468af20d32ed1ac8b15","head":{"label":"axw:state-storage-setcharm-storageconstraints","ref":"state-storage-setcharm-storageconstraints","sha":"448e8ca8d2c854ee4dfd4468af20d32ed1ac8b15","user":{"login":"axw","id":843579,"avatar_url":"https://avatars.githubusercontent.com/u/843579?v=3","gravatar_id":"","url":"https://api.github.com/users/axw","html_url":"https://github.com/axw","followers_url":"https://api.github.com/users/axw/followers","following_url":"https://api.github.com/users/axw/following{/other_user}","gists_url":"https://api.github.com/users/axw/gists{/gist_id}","starred_url":"https://api.github.com/users/axw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axw/subscriptions","organizations_url":"https://api.github.com/users/axw/orgs","repos_url":"https://api.github.com/users/axw/repos","events_url":"https://api.github.com/users/axw/events{/privacy}","received_events_url":"https://api.github.com/users/axw/received_events","type":"User","site_admin":false},"repo":{"id":20466577,"name":"juju","full_name":"axw/juju","owner":{"login":"axw","id":843579,"avatar_url":"https://avatars.githubusercontent.com/u/843579?v=3","gravatar_id":"","url":"https://api.github.com/users/axw","html_url":"https://github.com/axw","followers_url":"https://api.github.com/users/axw/followers","following_url":"https://api.github.com/users/axw/following{/other_user}","gists_url":"https://api.github.com/users/axw/gists{/gist_id}","starred_url":"https://api.github.com/users/axw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axw/subscriptions","organizations_url":"https://api.github.com/users/axw/orgs","repos_url":"https://api.github.com/users/axw/repos","events_url":"https://api.github.com/users/axw/events{/privacy}","received_events_url":"https://api.github.com/users/axw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/axw/juju","description":"juju is devops distilled","fork":true,"url":"https://api.github.com/repos/axw/juju","forks_url":"https://api.github.com/repos/axw/juju/forks","keys_url":"https://api.github.com/repos/axw/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/axw/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/axw/juju/teams","hooks_url":"https://api.github.com/repos/axw/juju/hooks","issue_events_url":"https://api.github.com/repos/axw/juju/issues/events{/number}","events_url":"https://api.github.com/repos/axw/juju/events","assignees_url":"https://api.github.com/repos/axw/juju/assignees{/user}","branches_url":"https://api.github.com/repos/axw/juju/branches{/branch}","tags_url":"https://api.github.com/repos/axw/juju/tags","blobs_url":"https://api.github.com/repos/axw/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/axw/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/axw/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/axw/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/axw/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/axw/juju/languages","stargazers_url":"https://api.github.com/repos/axw/juju/stargazers","contributors_url":"https://api.github.com/repos/axw/juju/contributors","subscribers_url":"https://api.github.com/repos/axw/juju/subscribers","subscription_url":"https://api.github.com/repos/axw/juju/subscription","commits_url":"https://api.github.com/repos/axw/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/axw/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/axw/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/axw/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/axw/juju/contents/{+path}","compare_url":"https://api.github.com/repos/axw/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/axw/juju/merges","archive_url":"https://api.github.com/repos/axw/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/axw/juju/downloads","issues_url":"https://api.github.com/repos/axw/juju/issues{/number}","pulls_url":"https://api.github.com/repos/axw/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/axw/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/axw/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/axw/juju/labels{/name}","releases_url":"https://api.github.com/repos/axw/juju/releases{/id}","deployments_url":"https://api.github.com/repos/axw/juju/deployments","created_at":"2014-06-04T01:51:25Z","updated_at":"2016-08-11T02:25:45Z","pushed_at":"2016-09-27T12:35:27Z","git_url":"git://github.com/axw/juju.git","ssh_url":"git@github.com:axw/juju.git","clone_url":"https://github.com/axw/juju.git","svn_url":"https://github.com/axw/juju","homepage":null,"size":103415,"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":"juju:master","ref":"master","sha":"477fe7a1f61d060b395c329c01e5e916f6498273","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":20445947,"name":"juju","full_name":"juju/juju","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/juju","description":"juju is devops distilled","fork":false,"url":"https://api.github.com/repos/juju/juju","forks_url":"https://api.github.com/repos/juju/juju/forks","keys_url":"https://api.github.com/repos/juju/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/juju/teams","hooks_url":"https://api.github.com/repos/juju/juju/hooks","issue_events_url":"https://api.github.com/repos/juju/juju/issues/events{/number}","events_url":"https://api.github.com/repos/juju/juju/events","assignees_url":"https://api.github.com/repos/juju/juju/assignees{/user}","branches_url":"https://api.github.com/repos/juju/juju/branches{/branch}","tags_url":"https://api.github.com/repos/juju/juju/tags","blobs_url":"https://api.github.com/repos/juju/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/juju/languages","stargazers_url":"https://api.github.com/repos/juju/juju/stargazers","contributors_url":"https://api.github.com/repos/juju/juju/contributors","subscribers_url":"https://api.github.com/repos/juju/juju/subscribers","subscription_url":"https://api.github.com/repos/juju/juju/subscription","commits_url":"https://api.github.com/repos/juju/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/juju/contents/{+path}","compare_url":"https://api.github.com/repos/juju/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/juju/merges","archive_url":"https://api.github.com/repos/juju/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/juju/downloads","issues_url":"https://api.github.com/repos/juju/juju/issues{/number}","pulls_url":"https://api.github.com/repos/juju/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/juju/labels{/name}","releases_url":"https://api.github.com/repos/juju/juju/releases{/id}","deployments_url":"https://api.github.com/repos/juju/juju/deployments","created_at":"2014-06-03T14:28:10Z","updated_at":"2016-09-27T19:18:22Z","pushed_at":"2016-09-27T18:17:46Z","git_url":"git://github.com/juju/juju.git","ssh_url":"git@github.com:juju/juju.git","clone_url":"https://github.com/juju/juju.git","svn_url":"https://github.com/juju/juju","homepage":"juju.ubuntu.com","size":125960,"stargazers_count":507,"watchers_count":507,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":158,"mirror_url":null,"open_issues_count":21,"forks":158,"open_issues":21,"watchers":507,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/6313"},"html":{"href":"https://github.com/juju/juju/pull/6313"},"issue":{"href":"https://api.github.com/repos/juju/juju/issues/6313"},"comments":{"href":"https://api.github.com/repos/juju/juju/issues/6313/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju/pulls/6313/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/juju/pulls/6313/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju/statuses/448e8ca8d2c854ee4dfd4468af20d32ed1ac8b15"}}}}
{"actor":{"display_login":"mjs"}}