{"action":"closed","number":2489,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2489","id":79214285,"html_url":"https://github.com/jenkinsci/jenkins/pull/2489","diff_url":"https://github.com/jenkinsci/jenkins/pull/2489.diff","patch_url":"https://github.com/jenkinsci/jenkins/pull/2489.patch","issue_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/2489","number":2489,"state":"closed","locked":false,"title":"[FIXED JENKINS-37041] Ensure that detached plugins are always at least their minimum version","user":{"login":"stephenc","id":209336,"avatar_url":"https://avatars.githubusercontent.com/u/209336?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenc","html_url":"https://github.com/stephenc","followers_url":"https://api.github.com/users/stephenc/followers","following_url":"https://api.github.com/users/stephenc/following{/other_user}","gists_url":"https://api.github.com/users/stephenc/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenc/subscriptions","organizations_url":"https://api.github.com/users/stephenc/orgs","repos_url":"https://api.github.com/users/stephenc/repos","events_url":"https://api.github.com/users/stephenc/events{/privacy}","received_events_url":"https://api.github.com/users/stephenc/received_events","type":"User","site_admin":false},"body":"See [JENKINS-37041](https://issues.jenkins-ci.org/browse/JENKINS-37041)\r\n\r\nOk, so here was the test scenario:\r\n\r\n1. Upgrade Jenkins (this will upgrade the detached plugin)\r\n2. Stop Jenkins\r\n3. Overwrite the detached plugin with the older version\r\n4. Start Jenkins\r\n5. Watch as the world burns\r\n\r\nWith this fix, under my *(slightly contrived)* test scenario I now get\r\n\r\n```\r\nINFO: Started initialization\r\nJul 28, 2016 4:07:38 PM hudson.PluginManager loadDetachedPlugins\r\nWARNING: Detached plugin bouncycastle-api found at version 1.648.3, required minimum version is 2.16.0\r\n...\r\nINFO: Initializing Bouncy Castle security provider.\r\nJul 28, 2016 4:07:39 PM jenkins.bouncycastle.api.SecurityProviderInitializer addSecurityProvider\r\nINFO: Bouncy Castle security provider initialized.\r\nJul 28, 2016 4:07:42 PM jenkins.InitReactorRunner$1 onAttained\r\n```\r\n\r\nSo this fixed the only code path that I could find that remained whereby a plugin that has been detached would not get upgraded (namely if the admin mistakenly overwrites the detached plugin with an older version than the stated minimum version)\r\n\r\nCRITICAL IMHO that this lands in 2.16\r\n\r\n@reviewbybees @jenkinsci/code-reviewers ","created_at":"2016-07-28T15:14:05Z","updated_at":"2016-07-28T20:30:47Z","closed_at":"2016-07-28T20:30:47Z","merged_at":"2016-07-28T20:30:47Z","merge_commit_sha":"841cba54dd3aa7f1c2b7d105b6bd889207b13b4d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2489/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2489/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/2489/comments","statuses_url":"https://api.github.com/repos/jenkinsci/jenkins/statuses/d92fd4cc63e19c60e374e45e045dcdce2d91e951","head":{"label":"stephenc:jenkins-37041","ref":"jenkins-37041","sha":"d92fd4cc63e19c60e374e45e045dcdce2d91e951","user":{"login":"stephenc","id":209336,"avatar_url":"https://avatars.githubusercontent.com/u/209336?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenc","html_url":"https://github.com/stephenc","followers_url":"https://api.github.com/users/stephenc/followers","following_url":"https://api.github.com/users/stephenc/following{/other_user}","gists_url":"https://api.github.com/users/stephenc/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenc/subscriptions","organizations_url":"https://api.github.com/users/stephenc/orgs","repos_url":"https://api.github.com/users/stephenc/repos","events_url":"https://api.github.com/users/stephenc/events{/privacy}","received_events_url":"https://api.github.com/users/stephenc/received_events","type":"User","site_admin":false},"repo":{"id":1399992,"name":"jenkins","full_name":"stephenc/jenkins","owner":{"login":"stephenc","id":209336,"avatar_url":"https://avatars.githubusercontent.com/u/209336?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenc","html_url":"https://github.com/stephenc","followers_url":"https://api.github.com/users/stephenc/followers","following_url":"https://api.github.com/users/stephenc/following{/other_user}","gists_url":"https://api.github.com/users/stephenc/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenc/subscriptions","organizations_url":"https://api.github.com/users/stephenc/orgs","repos_url":"https://api.github.com/users/stephenc/repos","events_url":"https://api.github.com/users/stephenc/events{/privacy}","received_events_url":"https://api.github.com/users/stephenc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stephenc/jenkins","description":"Jenkins Continuous Integration Server","fork":true,"url":"https://api.github.com/repos/stephenc/jenkins","forks_url":"https://api.github.com/repos/stephenc/jenkins/forks","keys_url":"https://api.github.com/repos/stephenc/jenkins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stephenc/jenkins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stephenc/jenkins/teams","hooks_url":"https://api.github.com/repos/stephenc/jenkins/hooks","issue_events_url":"https://api.github.com/repos/stephenc/jenkins/issues/events{/number}","events_url":"https://api.github.com/repos/stephenc/jenkins/events","assignees_url":"https://api.github.com/repos/stephenc/jenkins/assignees{/user}","branches_url":"https://api.github.com/repos/stephenc/jenkins/branches{/branch}","tags_url":"https://api.github.com/repos/stephenc/jenkins/tags","blobs_url":"https://api.github.com/repos/stephenc/jenkins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stephenc/jenkins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stephenc/jenkins/git/refs{/sha}","trees_url":"https://api.github.com/repos/stephenc/jenkins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stephenc/jenkins/statuses/{sha}","languages_url":"https://api.github.com/repos/stephenc/jenkins/languages","stargazers_url":"https://api.github.com/repos/stephenc/jenkins/stargazers","contributors_url":"https://api.github.com/repos/stephenc/jenkins/contributors","subscribers_url":"https://api.github.com/repos/stephenc/jenkins/subscribers","subscription_url":"https://api.github.com/repos/stephenc/jenkins/subscription","commits_url":"https://api.github.com/repos/stephenc/jenkins/commits{/sha}","git_commits_url":"https://api.github.com/repos/stephenc/jenkins/git/commits{/sha}","comments_url":"https://api.github.com/repos/stephenc/jenkins/comments{/number}","issue_comment_url":"https://api.github.com/repos/stephenc/jenkins/issues/comments{/number}","contents_url":"https://api.github.com/repos/stephenc/jenkins/contents/{+path}","compare_url":"https://api.github.com/repos/stephenc/jenkins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stephenc/jenkins/merges","archive_url":"https://api.github.com/repos/stephenc/jenkins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stephenc/jenkins/downloads","issues_url":"https://api.github.com/repos/stephenc/jenkins/issues{/number}","pulls_url":"https://api.github.com/repos/stephenc/jenkins/pulls{/number}","milestones_url":"https://api.github.com/repos/stephenc/jenkins/milestones{/number}","notifications_url":"https://api.github.com/repos/stephenc/jenkins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stephenc/jenkins/labels{/name}","releases_url":"https://api.github.com/repos/stephenc/jenkins/releases{/id}","deployments_url":"https://api.github.com/repos/stephenc/jenkins/deployments","created_at":"2011-02-22T23:22:48Z","updated_at":"2015-04-27T13:30:13Z","pushed_at":"2016-07-28T15:30:24Z","git_url":"git://github.com/stephenc/jenkins.git","ssh_url":"git@github.com:stephenc/jenkins.git","clone_url":"https://github.com/stephenc/jenkins.git","svn_url":"https://github.com/stephenc/jenkins","homepage":"http://jenkins-ci.org/","size":90105,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"edfffb160a8a96fd4df4eca96d608b883f21b993","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":1103607,"name":"jenkins","full_name":"jenkinsci/jenkins","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/jenkins","description":"Jenkins Continuous Integration Server","fork":true,"url":"https://api.github.com/repos/jenkinsci/jenkins","forks_url":"https://api.github.com/repos/jenkinsci/jenkins/forks","keys_url":"https://api.github.com/repos/jenkinsci/jenkins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/jenkins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/jenkins/teams","hooks_url":"https://api.github.com/repos/jenkinsci/jenkins/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/jenkins/events","assignees_url":"https://api.github.com/repos/jenkinsci/jenkins/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/jenkins/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/jenkins/tags","blobs_url":"https://api.github.com/repos/jenkinsci/jenkins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/jenkins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/jenkins/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/jenkins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/jenkins/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/jenkins/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/jenkins/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/jenkins/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/jenkins/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/jenkins/subscription","commits_url":"https://api.github.com/repos/jenkinsci/jenkins/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/jenkins/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/jenkins/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/jenkins/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/jenkins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/jenkins/merges","archive_url":"https://api.github.com/repos/jenkinsci/jenkins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/jenkins/downloads","issues_url":"https://api.github.com/repos/jenkinsci/jenkins/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/jenkins/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/jenkins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/jenkins/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/jenkins/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/jenkins/deployments","created_at":"2010-11-22T21:21:23Z","updated_at":"2016-07-28T19:24:48Z","pushed_at":"2016-07-28T20:30:47Z","git_url":"git://github.com/jenkinsci/jenkins.git","ssh_url":"git@github.com:jenkinsci/jenkins.git","clone_url":"https://github.com/jenkinsci/jenkins.git","svn_url":"https://github.com/jenkinsci/jenkins","homepage":"https://jenkins.io/","size":138011,"stargazers_count":6375,"watchers_count":6375,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2685,"mirror_url":null,"open_issues_count":130,"forks":2685,"open_issues":130,"watchers":6375,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2489"},"html":{"href":"https://github.com/jenkinsci/jenkins/pull/2489"},"issue":{"href":"https://api.github.com/repos/jenkinsci/jenkins/issues/2489"},"comments":{"href":"https://api.github.com/repos/jenkinsci/jenkins/issues/2489/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2489/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2489/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/jenkins/statuses/d92fd4cc63e19c60e374e45e045dcdce2d91e951"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"stephenc","id":209336,"avatar_url":"https://avatars.githubusercontent.com/u/209336?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenc","html_url":"https://github.com/stephenc","followers_url":"https://api.github.com/users/stephenc/followers","following_url":"https://api.github.com/users/stephenc/following{/other_user}","gists_url":"https://api.github.com/users/stephenc/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenc/subscriptions","organizations_url":"https://api.github.com/users/stephenc/orgs","repos_url":"https://api.github.com/users/stephenc/repos","events_url":"https://api.github.com/users/stephenc/events{/privacy}","received_events_url":"https://api.github.com/users/stephenc/received_events","type":"User","site_admin":false},"comments":12,"review_comments":2,"commits":2,"additions":42,"deletions":8,"changed_files":2}}
{"actor":{"display_login":"stephenc"}}