{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/comments/82162726","pull_request_review_id":3088268,"id":82162726,"diff_hunk":"@@ -179,5 +206,45 @@ public class Utils {\n         r.addAction(new ExecutionModelAction(stages))\n     }\n \n+    /**\n+     * Creates and sets the loading for a cache of {@link Describable}s descending from the given descriptor type.\n+     *\n+     * @param type The {@link Descriptor} class whose extensions we want to find.\n+     * @param excludedSymbols Optional list of symbol names to exclude from the cache.\n+     * @return A {@link LoadingCache} for looking up types from symbols.\n+     */\n+    static generateTypeCache(Class<? extends Descriptor> type, List<String> excludedSymbols = []) {\n+        return CacheBuilder.newBuilder()\n+            .expireAfterWrite(10, TimeUnit.MINUTES)\n+            .build(new CacheLoader<Object, Map<String, String>>() {\n+            @Override\n+            Map<String, String> load(Object key) throws Exception {\n+                return populateTypeCache(type, excludedSymbols)","path":"src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy","position":105,"original_position":105,"commit_id":"9802ef7bc5c7f082e4ceccbeb87558561abdb9e5","original_commit_id":"9802ef7bc5c7f082e4ceccbeb87558561abdb9e5","user":{"login":"abayer","id":120218,"avatar_url":"https://avatars.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"body":"There were Reasons. =) I can't remember the exact reasoning at the time, but the idea was to take advantage of thread safety, periodic refreshes, etc with `LoadingCache`, but load everything into it at once rather than re-querying `ExtensionList` every time.","created_at":"2016-10-06T10:55:31Z","updated_at":"2016-10-06T10:55:31Z","html_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/27#discussion_r82162726","pull_request_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/comments/82162726"},"html":{"href":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/27#discussion_r82162726"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/27","id":88064674,"html_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/27","diff_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/27.diff","patch_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/27.patch","issue_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/27","number":27,"state":"open","locked":false,"title":"[FIXED JENKINS-37824] Adding job property-related functionality","user":{"login":"abayer","id":120218,"avatar_url":"https://avatars.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"body":"[JENKINS-37824](https://issues.jenkins-ci.org/browse/JENKINS-37824)\r\n\r\n- [x] Implement runtime translation and execution.\r\n- [x] Implement Groovy and JSON parsing.\r\n- [x] Implement validation.\r\n- [x] Test validation failure cases.\r\n- [ ] More elaborate success case tests.\r\n\r\ncc @reviewbybees esp @oleg-nenashev @rsandell @michaelneale @HRMPW  ","created_at":"2016-10-05T12:03:32Z","updated_at":"2016-10-06T10:55:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c5e25b23f62f73d8e910bd2e27d2380f5961c5a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/27/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/27/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/27/comments","statuses_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/statuses/9802ef7bc5c7f082e4ceccbeb87558561abdb9e5","head":{"label":"abayer:jenkins-37824","ref":"jenkins-37824","sha":"9802ef7bc5c7f082e4ceccbeb87558561abdb9e5","user":{"login":"abayer","id":120218,"avatar_url":"https://avatars.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"repo":{"id":66791984,"name":"pipeline-model-definition-plugin","full_name":"abayer/pipeline-model-definition-plugin","owner":{"login":"abayer","id":120218,"avatar_url":"https://avatars.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abayer/pipeline-model-definition-plugin","description":null,"fork":true,"url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin","forks_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/forks","keys_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/teams","hooks_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/hooks","issue_events_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/events","assignees_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/tags","blobs_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/languages","stargazers_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/stargazers","contributors_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/contributors","subscribers_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/subscribers","subscription_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/subscription","commits_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/merges","archive_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/downloads","issues_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/labels{/name}","releases_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/deployments","created_at":"2016-08-28T21:35:16Z","updated_at":"2016-08-30T16:19:42Z","pushed_at":"2016-10-06T08:20:22Z","git_url":"git://github.com/abayer/pipeline-model-definition-plugin.git","ssh_url":"git@github.com:abayer/pipeline-model-definition-plugin.git","clone_url":"https://github.com/abayer/pipeline-model-definition-plugin.git","svn_url":"https://github.com/abayer/pipeline-model-definition-plugin","homepage":"","size":392,"stargazers_count":0,"watchers_count":0,"language":"Groovy","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":"366510af23854215f7ed19869ff1ee0f1e6e45de","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":66677338,"name":"pipeline-model-definition-plugin","full_name":"jenkinsci/pipeline-model-definition-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/pipeline-model-definition-plugin","description":null,"fork":false,"url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin","forks_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/deployments","created_at":"2016-08-26T20:28:39Z","updated_at":"2016-10-05T05:45:21Z","pushed_at":"2016-10-06T08:20:22Z","git_url":"git://github.com/jenkinsci/pipeline-model-definition-plugin.git","ssh_url":"git@github.com:jenkinsci/pipeline-model-definition-plugin.git","clone_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin.git","svn_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin","homepage":"","size":389,"stargazers_count":11,"watchers_count":11,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":7,"forks":8,"open_issues":7,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/27"},"html":{"href":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/27"},"issue":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/27"},"comments":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/statuses/9802ef7bc5c7f082e4ceccbeb87558561abdb9e5"}}}}
{"actor":{"display_login":"abayer"}}