{"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju/pulls/comments/110265338","pull_request_review_id":31428045,"id":110265338,"diff_hunk":"@@ -271,6 +273,20 @@ func (c *upgradeCharmCommand) Run(ctx *cmd.Context) error {\n \t\treturn errors.Trace(err)\n \t}\n \n+\t// If the URL of the running application specifies no series, then use\n+\t// the series of the running application. This is needed since the\n+\t// application was likely deployed from a multiple-series charm that\n+\t// does not specify a series in its URL but other means like\n+\t// command line flag.\n+\tif oldURL.Series == \"\" {","path":"cmd/juju/application/upgradecharm.go","position":25,"original_position":25,"commit_id":"83036e5d2368da0b5c049a4efb8d5bdd2baab77b","original_commit_id":"83036e5d2368da0b5c049a4efb8d5bdd2baab77b","user":{"login":"ExternalReality","id":1026081,"avatar_url":"https://avatars0.githubusercontent.com/u/1026081?v=3","gravatar_id":"","url":"https://api.github.com/users/ExternalReality","html_url":"https://github.com/ExternalReality","followers_url":"https://api.github.com/users/ExternalReality/followers","following_url":"https://api.github.com/users/ExternalReality/following{/other_user}","gists_url":"https://api.github.com/users/ExternalReality/gists{/gist_id}","starred_url":"https://api.github.com/users/ExternalReality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExternalReality/subscriptions","organizations_url":"https://api.github.com/users/ExternalReality/orgs","repos_url":"https://api.github.com/users/ExternalReality/repos","events_url":"https://api.github.com/users/ExternalReality/events{/privacy}","received_events_url":"https://api.github.com/users/ExternalReality/received_events","type":"User","site_admin":false},"body":"Should we also check that we are upgrading from a local charm?","created_at":"2017-04-06T20:55:39Z","updated_at":"2017-04-06T20:55:39Z","html_url":"https://github.com/juju/juju/pull/7210#discussion_r110265338","pull_request_url":"https://api.github.com/repos/juju/juju/pulls/7210","_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/110265338"},"html":{"href":"https://github.com/juju/juju/pull/7210#discussion_r110265338"},"pull_request":{"href":"https://api.github.com/repos/juju/juju/pulls/7210"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/7210","id":114687476,"html_url":"https://github.com/juju/juju/pull/7210","diff_url":"https://github.com/juju/juju/pull/7210.diff","patch_url":"https://github.com/juju/juju/pull/7210.patch","issue_url":"https://api.github.com/repos/juju/juju/issues/7210","number":7210,"state":"open","locked":false,"title":"Fix multi-series local charm upgrade","user":{"login":"ExternalReality","id":1026081,"avatar_url":"https://avatars0.githubusercontent.com/u/1026081?v=3","gravatar_id":"","url":"https://api.github.com/users/ExternalReality","html_url":"https://github.com/ExternalReality","followers_url":"https://api.github.com/users/ExternalReality/followers","following_url":"https://api.github.com/users/ExternalReality/following{/other_user}","gists_url":"https://api.github.com/users/ExternalReality/gists{/gist_id}","starred_url":"https://api.github.com/users/ExternalReality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExternalReality/subscriptions","organizations_url":"https://api.github.com/users/ExternalReality/orgs","repos_url":"https://api.github.com/users/ExternalReality/repos","events_url":"https://api.github.com/users/ExternalReality/events{/privacy}","received_events_url":"https://api.github.com/users/ExternalReality/received_events","type":"User","site_admin":false},"body":"## Description of change\r\n\r\nWith a deployed mutli-series charm from the charm store, attempts to upgrade that charm's application from a local repository fail with the following error:\r\n\r\n```bash\r\nERROR cannot upgrade application <application name> to charm <local charm url>: cannot change an application's series\r\n```\r\n\r\nThis happens since the upgrading from a multi-series charm (having no series in its URL) is dependent on the order of series found in the local charms repository's `metadata.yml` file. The upgrade command attempts to upgrade to the first series found in the file.  \r\n\r\n## QA steps\r\n\r\nDeploy the ubuntu charm from the charm store (the ubuntu charm is a multi-series charm having no series specified in its URL) with the series `trusty` defined at the command line.\r\n\r\n```bash\r\njuju deploy ubuntu --series trusty\r\n``` \r\n\r\nDownload the ubuntu charm form the charm store\r\n\r\n```bash\r\nwget https://api.jujucharms.com/charmstore/v5/ubuntu-10/archive\r\n```\r\n\r\nUnzip the archive into a folder named ubuntu (this is your local charm from which to upgrade)\r\n\r\n```bash\r\nunzip archive -d ubuntu\r\n```\r\n\r\nUpgrade the deployed ubuntu application\r\n```\r\njuju upgrade-charm ubuntu --path ./ubuntu\r\n```\r\n\r\nYou will either see the error specified above or you have applied the fix in this PR and should see the command select the appropriate series and complete the upgrade successfully.\r\n\r\n## Documentation changes\r\n\r\nN/A\r\n\r\n## Bug reference\r\n\r\n[lp#1673122](https://bugs.launchpad.net/juju/+bug/1673122)\r\n","created_at":"2017-04-06T20:25:52Z","updated_at":"2017-04-06T20:55:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d035d6f3e2a3911bef3c1dbf2f546f907fcce207","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju/pulls/7210/commits","review_comments_url":"https://api.github.com/repos/juju/juju/pulls/7210/comments","review_comment_url":"https://api.github.com/repos/juju/juju/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/juju/issues/7210/comments","statuses_url":"https://api.github.com/repos/juju/juju/statuses/83036e5d2368da0b5c049a4efb8d5bdd2baab77b","head":{"label":"ExternalReality:bug_1673122","ref":"bug_1673122","sha":"83036e5d2368da0b5c049a4efb8d5bdd2baab77b","user":{"login":"ExternalReality","id":1026081,"avatar_url":"https://avatars0.githubusercontent.com/u/1026081?v=3","gravatar_id":"","url":"https://api.github.com/users/ExternalReality","html_url":"https://github.com/ExternalReality","followers_url":"https://api.github.com/users/ExternalReality/followers","following_url":"https://api.github.com/users/ExternalReality/following{/other_user}","gists_url":"https://api.github.com/users/ExternalReality/gists{/gist_id}","starred_url":"https://api.github.com/users/ExternalReality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExternalReality/subscriptions","organizations_url":"https://api.github.com/users/ExternalReality/orgs","repos_url":"https://api.github.com/users/ExternalReality/repos","events_url":"https://api.github.com/users/ExternalReality/events{/privacy}","received_events_url":"https://api.github.com/users/ExternalReality/received_events","type":"User","site_admin":false},"repo":{"id":82218532,"name":"juju","full_name":"ExternalReality/juju","owner":{"login":"ExternalReality","id":1026081,"avatar_url":"https://avatars0.githubusercontent.com/u/1026081?v=3","gravatar_id":"","url":"https://api.github.com/users/ExternalReality","html_url":"https://github.com/ExternalReality","followers_url":"https://api.github.com/users/ExternalReality/followers","following_url":"https://api.github.com/users/ExternalReality/following{/other_user}","gists_url":"https://api.github.com/users/ExternalReality/gists{/gist_id}","starred_url":"https://api.github.com/users/ExternalReality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExternalReality/subscriptions","organizations_url":"https://api.github.com/users/ExternalReality/orgs","repos_url":"https://api.github.com/users/ExternalReality/repos","events_url":"https://api.github.com/users/ExternalReality/events{/privacy}","received_events_url":"https://api.github.com/users/ExternalReality/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ExternalReality/juju","description":"juju is devops distilled","fork":true,"url":"https://api.github.com/repos/ExternalReality/juju","forks_url":"https://api.github.com/repos/ExternalReality/juju/forks","keys_url":"https://api.github.com/repos/ExternalReality/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ExternalReality/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ExternalReality/juju/teams","hooks_url":"https://api.github.com/repos/ExternalReality/juju/hooks","issue_events_url":"https://api.github.com/repos/ExternalReality/juju/issues/events{/number}","events_url":"https://api.github.com/repos/ExternalReality/juju/events","assignees_url":"https://api.github.com/repos/ExternalReality/juju/assignees{/user}","branches_url":"https://api.github.com/repos/ExternalReality/juju/branches{/branch}","tags_url":"https://api.github.com/repos/ExternalReality/juju/tags","blobs_url":"https://api.github.com/repos/ExternalReality/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ExternalReality/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ExternalReality/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/ExternalReality/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ExternalReality/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/ExternalReality/juju/languages","stargazers_url":"https://api.github.com/repos/ExternalReality/juju/stargazers","contributors_url":"https://api.github.com/repos/ExternalReality/juju/contributors","subscribers_url":"https://api.github.com/repos/ExternalReality/juju/subscribers","subscription_url":"https://api.github.com/repos/ExternalReality/juju/subscription","commits_url":"https://api.github.com/repos/ExternalReality/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/ExternalReality/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/ExternalReality/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/ExternalReality/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/ExternalReality/juju/contents/{+path}","compare_url":"https://api.github.com/repos/ExternalReality/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ExternalReality/juju/merges","archive_url":"https://api.github.com/repos/ExternalReality/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ExternalReality/juju/downloads","issues_url":"https://api.github.com/repos/ExternalReality/juju/issues{/number}","pulls_url":"https://api.github.com/repos/ExternalReality/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/ExternalReality/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/ExternalReality/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ExternalReality/juju/labels{/name}","releases_url":"https://api.github.com/repos/ExternalReality/juju/releases{/id}","deployments_url":"https://api.github.com/repos/ExternalReality/juju/deployments","created_at":"2017-02-16T19:36:01Z","updated_at":"2017-02-16T19:36:14Z","pushed_at":"2017-04-06T19:54:52Z","git_url":"git://github.com/ExternalReality/juju.git","ssh_url":"git@github.com:ExternalReality/juju.git","clone_url":"https://github.com/ExternalReality/juju.git","svn_url":"https://github.com/ExternalReality/juju","homepage":"juju.ubuntu.com","size":103017,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"staging"}},"base":{"label":"juju:develop","ref":"develop","sha":"ba92526c29dd63c427aa2354d1724345f9e9a821","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars3.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://avatars3.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":"2017-04-06T16:21:21Z","pushed_at":"2017-04-06T20:25:53Z","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":103061,"stargazers_count":890,"watchers_count":890,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":200,"mirror_url":null,"open_issues_count":24,"forks":200,"open_issues":24,"watchers":890,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/7210"},"html":{"href":"https://github.com/juju/juju/pull/7210"},"issue":{"href":"https://api.github.com/repos/juju/juju/issues/7210"},"comments":{"href":"https://api.github.com/repos/juju/juju/issues/7210/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju/pulls/7210/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/juju/pulls/7210/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju/statuses/83036e5d2368da0b5c049a4efb8d5bdd2baab77b"}}}}
{"actor":{"display_login":"ExternalReality"}}