{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/comments/90679287","pull_request_review_id":11199090,"id":90679287,"diff_hunk":"@@ -0,0 +1,106 @@\n+/*\n+ * The MIT License\n+ *\n+ * Copyright (c) 2016, CloudBees, Inc.\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included in\n+ * all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+ * THE SOFTWARE.\n+ */\n+\n+package com.cloudbees.jenkins.support;\n+\n+import com.cloudbees.jenkins.support.api.SupportProvider;\n+import com.google.common.annotations.VisibleForTesting;\n+import edu.umd.cs.findbugs.annotations.NonNull;\n+import hudson.Extension;\n+import hudson.ExtensionList;\n+import hudson.ExtensionPoint;\n+\n+import java.util.logging.Level;\n+import java.util.logging.Logger;\n+\n+/**\n+ * <p>Extension point allowing to customize the support bundle naming strategy.</p>\n+ * <p>\n+ * It will work the following way:\n+ * </p>\n+ * <ol>\n+ * <li>If an implementation of {@link BundleNameInstanceTypeProvider} is found, it will be used.<br>\n+ * <strong>WARNING: </strong>if many are found, then a warning will be issued, and the first extension found will\n+ * be used.</li>","path":"src/main/java/com/cloudbees/jenkins/support/BundleNameInstanceTypeProvider.java","position":45,"original_position":45,"commit_id":"5d7226a281b603c48ebf8a6e29221799c1bb9c49","original_commit_id":"5d7226a281b603c48ebf8a6e29221799c1bb9c49","user":{"login":"jglick","id":154109,"avatar_url":"https://avatars.githubusercontent.com/u/154109?v=3","gravatar_id":"","url":"https://api.github.com/users/jglick","html_url":"https://github.com/jglick","followers_url":"https://api.github.com/users/jglick/followers","following_url":"https://api.github.com/users/jglick/following{/other_user}","gists_url":"https://api.github.com/users/jglick/gists{/gist_id}","starred_url":"https://api.github.com/users/jglick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jglick/subscriptions","organizations_url":"https://api.github.com/users/jglick/orgs","repos_url":"https://api.github.com/users/jglick/repos","events_url":"https://api.github.com/users/jglick/events{/privacy}","received_events_url":"https://api.github.com/users/jglick/received_events","type":"User","site_admin":false},"body":"So, where is this nondefault implementation? For any newly introduced API I expect to see a PR from another plugin repository using a `SNAPSHOT` dependency which consumes that API. (Obviously public use cases are preferred whenever possible, but note that a PR in a private repository may refer in its summary etc. to a public PR, in which case GitHub automatically creates a backlink in the public PR visible to users who have permission to view the private repo.)","created_at":"2016-12-02T16:59:27Z","updated_at":"2016-12-02T16:59:27Z","html_url":"https://github.com/jenkinsci/support-core-plugin/pull/92#discussion_r90679287","pull_request_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/92","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/comments/90679287"},"html":{"href":"https://github.com/jenkinsci/support-core-plugin/pull/92#discussion_r90679287"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/92"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/92","id":95871383,"html_url":"https://github.com/jenkinsci/support-core-plugin/pull/92","diff_url":"https://github.com/jenkinsci/support-core-plugin/pull/92.diff","patch_url":"https://github.com/jenkinsci/support-core-plugin/pull/92.patch","issue_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/issues/92","number":92,"state":"open","locked":false,"title":"[JENKINS-40098] Bundle naming strategy should be able to specify an instance type","user":{"login":"batmat","id":223853,"avatar_url":"https://avatars.githubusercontent.com/u/223853?v=3","gravatar_id":"","url":"https://api.github.com/users/batmat","html_url":"https://github.com/batmat","followers_url":"https://api.github.com/users/batmat/followers","following_url":"https://api.github.com/users/batmat/following{/other_user}","gists_url":"https://api.github.com/users/batmat/gists{/gist_id}","starred_url":"https://api.github.com/users/batmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batmat/subscriptions","organizations_url":"https://api.github.com/users/batmat/orgs","repos_url":"https://api.github.com/users/batmat/repos","events_url":"https://api.github.com/users/batmat/events{/privacy}","received_events_url":"https://api.github.com/users/batmat/received_events","type":"User","site_admin":false},"body":"[JENKINS-40098](https://issues.jenkins-ci.org/browse/JENKINS-40098)\r\n\r\nRefactored the existing code to use the same logic for choosing the bundle filename, and introduced a change enabling both overriding through using a sysprop, or implementing a new Extension Point.\r\n\r\nThe approach with Extension Points should enable more dynamic needs, when the sysprop one will be immediately usable by anyone without having to develop an extension.\r\n\r\nNote: if found, the extension is preferred over the sysprop.\r\n\r\n@reviewbybees esp. @jglick who pointed me to SupportProvider.getName() I had missed in the first attempt. \r\n\r\nSupersedes #91","created_at":"2016-11-30T11:11:36Z","updated_at":"2016-12-02T16:59:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cffb057999d51bd61fc5f1cc762093948fed80dc","assignee":{"login":"jglick","id":154109,"avatar_url":"https://avatars.githubusercontent.com/u/154109?v=3","gravatar_id":"","url":"https://api.github.com/users/jglick","html_url":"https://github.com/jglick","followers_url":"https://api.github.com/users/jglick/followers","following_url":"https://api.github.com/users/jglick/following{/other_user}","gists_url":"https://api.github.com/users/jglick/gists{/gist_id}","starred_url":"https://api.github.com/users/jglick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jglick/subscriptions","organizations_url":"https://api.github.com/users/jglick/orgs","repos_url":"https://api.github.com/users/jglick/repos","events_url":"https://api.github.com/users/jglick/events{/privacy}","received_events_url":"https://api.github.com/users/jglick/received_events","type":"User","site_admin":false},"assignees":[{"login":"jglick","id":154109,"avatar_url":"https://avatars.githubusercontent.com/u/154109?v=3","gravatar_id":"","url":"https://api.github.com/users/jglick","html_url":"https://github.com/jglick","followers_url":"https://api.github.com/users/jglick/followers","following_url":"https://api.github.com/users/jglick/following{/other_user}","gists_url":"https://api.github.com/users/jglick/gists{/gist_id}","starred_url":"https://api.github.com/users/jglick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jglick/subscriptions","organizations_url":"https://api.github.com/users/jglick/orgs","repos_url":"https://api.github.com/users/jglick/repos","events_url":"https://api.github.com/users/jglick/events{/privacy}","received_events_url":"https://api.github.com/users/jglick/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/92/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/92/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/issues/92/comments","statuses_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/statuses/5d7226a281b603c48ebf8a6e29221799c1bb9c49","head":{"label":"batmat:JENKINS-40098-take-2","ref":"JENKINS-40098-take-2","sha":"5d7226a281b603c48ebf8a6e29221799c1bb9c49","user":{"login":"batmat","id":223853,"avatar_url":"https://avatars.githubusercontent.com/u/223853?v=3","gravatar_id":"","url":"https://api.github.com/users/batmat","html_url":"https://github.com/batmat","followers_url":"https://api.github.com/users/batmat/followers","following_url":"https://api.github.com/users/batmat/following{/other_user}","gists_url":"https://api.github.com/users/batmat/gists{/gist_id}","starred_url":"https://api.github.com/users/batmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batmat/subscriptions","organizations_url":"https://api.github.com/users/batmat/orgs","repos_url":"https://api.github.com/users/batmat/repos","events_url":"https://api.github.com/users/batmat/events{/privacy}","received_events_url":"https://api.github.com/users/batmat/received_events","type":"User","site_admin":false},"repo":{"id":73240939,"name":"support-core-plugin","full_name":"batmat/support-core-plugin","owner":{"login":"batmat","id":223853,"avatar_url":"https://avatars.githubusercontent.com/u/223853?v=3","gravatar_id":"","url":"https://api.github.com/users/batmat","html_url":"https://github.com/batmat","followers_url":"https://api.github.com/users/batmat/followers","following_url":"https://api.github.com/users/batmat/following{/other_user}","gists_url":"https://api.github.com/users/batmat/gists{/gist_id}","starred_url":"https://api.github.com/users/batmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batmat/subscriptions","organizations_url":"https://api.github.com/users/batmat/orgs","repos_url":"https://api.github.com/users/batmat/repos","events_url":"https://api.github.com/users/batmat/events{/privacy}","received_events_url":"https://api.github.com/users/batmat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/batmat/support-core-plugin","description":null,"fork":true,"url":"https://api.github.com/repos/batmat/support-core-plugin","forks_url":"https://api.github.com/repos/batmat/support-core-plugin/forks","keys_url":"https://api.github.com/repos/batmat/support-core-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/batmat/support-core-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/batmat/support-core-plugin/teams","hooks_url":"https://api.github.com/repos/batmat/support-core-plugin/hooks","issue_events_url":"https://api.github.com/repos/batmat/support-core-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/batmat/support-core-plugin/events","assignees_url":"https://api.github.com/repos/batmat/support-core-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/batmat/support-core-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/batmat/support-core-plugin/tags","blobs_url":"https://api.github.com/repos/batmat/support-core-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/batmat/support-core-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/batmat/support-core-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/batmat/support-core-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/batmat/support-core-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/batmat/support-core-plugin/languages","stargazers_url":"https://api.github.com/repos/batmat/support-core-plugin/stargazers","contributors_url":"https://api.github.com/repos/batmat/support-core-plugin/contributors","subscribers_url":"https://api.github.com/repos/batmat/support-core-plugin/subscribers","subscription_url":"https://api.github.com/repos/batmat/support-core-plugin/subscription","commits_url":"https://api.github.com/repos/batmat/support-core-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/batmat/support-core-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/batmat/support-core-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/batmat/support-core-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/batmat/support-core-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/batmat/support-core-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/batmat/support-core-plugin/merges","archive_url":"https://api.github.com/repos/batmat/support-core-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/batmat/support-core-plugin/downloads","issues_url":"https://api.github.com/repos/batmat/support-core-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/batmat/support-core-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/batmat/support-core-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/batmat/support-core-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/batmat/support-core-plugin/labels{/name}","releases_url":"https://api.github.com/repos/batmat/support-core-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/batmat/support-core-plugin/deployments","created_at":"2016-11-09T01:03:16Z","updated_at":"2016-11-09T01:03:17Z","pushed_at":"2016-11-30T22:53:59Z","git_url":"git://github.com/batmat/support-core-plugin.git","ssh_url":"git@github.com:batmat/support-core-plugin.git","clone_url":"https://github.com/batmat/support-core-plugin.git","svn_url":"https://github.com/batmat/support-core-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Support+Core+Plugin","size":692,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"jenkinsci:master","ref":"master","sha":"98e849886a10f3907fb1027a280fb23aab211ede","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":13830109,"name":"support-core-plugin","full_name":"jenkinsci/support-core-plugin","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/support-core-plugin","description":null,"fork":false,"url":"https://api.github.com/repos/jenkinsci/support-core-plugin","forks_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/support-core-plugin/deployments","created_at":"2013-10-24T11:18:45Z","updated_at":"2016-10-31T21:47:24Z","pushed_at":"2016-12-02T10:38:53Z","git_url":"git://github.com/jenkinsci/support-core-plugin.git","ssh_url":"git@github.com:jenkinsci/support-core-plugin.git","clone_url":"https://github.com/jenkinsci/support-core-plugin.git","svn_url":"https://github.com/jenkinsci/support-core-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Support+Core+Plugin","size":1100,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":12,"forks":29,"open_issues":12,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/92"},"html":{"href":"https://github.com/jenkinsci/support-core-plugin/pull/92"},"issue":{"href":"https://api.github.com/repos/jenkinsci/support-core-plugin/issues/92"},"comments":{"href":"https://api.github.com/repos/jenkinsci/support-core-plugin/issues/92/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/92/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/support-core-plugin/pulls/92/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/support-core-plugin/statuses/5d7226a281b603c48ebf8a6e29221799c1bb9c49"}}}}
{"actor":{"display_login":"jglick"}}