{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/comments/32200228","id":32200228,"diff_hunk":"@@ -0,0 +1,45 @@\n+package org.jenkinsci.plugins.uniqueid.implv2;\n+\n+import hudson.Extension;\n+import hudson.model.PersistenceRoot;\n+import hudson.model.Job;\n+import hudson.model.Run;\n+\n+import org.jenkinsci.plugins.uniqueid.IdStore;\n+\n+/**\n+ * Stores id's for runs as an action on the Run.\n+ */\n+@Extension(ordinal=1) // needs to take priority over the PersistenceRootIdStore\n+public class RunIdStore extends IdStore<Run> {\n+    public RunIdStore() {\n+        super(Run.class);\n+    }\n+\n+    @Override\n+    public void make(Run run) throws IllegalArgumentException, Exception {\n+        // we calculate these on the fly, or serve up migrated IDs if they exist.\n+        // in order to calculate on the fly we require the parent to have an id.\n+        IdStore.makeId(run.getParent());","path":"src/main/java/org/jenkinsci/plugins/uniqueid/implv2/RunIdStore.java","position":23,"original_position":23,"commit_id":"b5b5f08cd05556814b9651a135d06b14539eb6a6","original_commit_id":"b5b5f08cd05556814b9651a135d06b14539eb6a6","user":{"login":"tfennelly","id":429311,"avatar_url":"https://avatars.githubusercontent.com/u/429311?v=3","gravatar_id":"","url":"https://api.github.com/users/tfennelly","html_url":"https://github.com/tfennelly","followers_url":"https://api.github.com/users/tfennelly/followers","following_url":"https://api.github.com/users/tfennelly/following{/other_user}","gists_url":"https://api.github.com/users/tfennelly/gists{/gist_id}","starred_url":"https://api.github.com/users/tfennelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfennelly/subscriptions","organizations_url":"https://api.github.com/users/tfennelly/orgs","repos_url":"https://api.github.com/users/tfennelly/repos","events_url":"https://api.github.com/users/tfennelly/events{/privacy}","received_events_url":"https://api.github.com/users/tfennelly/received_events","type":"User","site_admin":false},"body":"I don't get this. We're passing a `Job` instance to `IdStore.makeId`, which is going to call `IdStore.forClass` with a `Job.class` type, which I assume means that `PersistenceRootIdStore.make` gets called (`JobIdStore` is deprecated and doesn't extend `IdStore` anymore so isn't an extension point). Hmmm... the need for this `RunIdStore` impl is less obvious now.","created_at":"2015-06-11T08:42:03Z","updated_at":"2015-06-11T08:42:03Z","html_url":"https://github.com/jenkinsci/unique-id-plugin/pull/1#discussion_r32200228","pull_request_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/comments/32200228"},"html":{"href":"https://github.com/jenkinsci/unique-id-plugin/pull/1#discussion_r32200228"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/1","id":37426445,"html_url":"https://github.com/jenkinsci/unique-id-plugin/pull/1","diff_url":"https://github.com/jenkinsci/unique-id-plugin/pull/1.diff","patch_url":"https://github.com/jenkinsci/unique-id-plugin/pull/1.patch","issue_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/issues/1","number":1,"state":"open","locked":false,"title":"[WIP] Jenkins-28843","user":{"login":"jtnord","id":494726,"avatar_url":"https://avatars.githubusercontent.com/u/494726?v=3","gravatar_id":"","url":"https://api.github.com/users/jtnord","html_url":"https://github.com/jtnord","followers_url":"https://api.github.com/users/jtnord/followers","following_url":"https://api.github.com/users/jtnord/following{/other_user}","gists_url":"https://api.github.com/users/jtnord/gists{/gist_id}","starred_url":"https://api.github.com/users/jtnord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtnord/subscriptions","organizations_url":"https://api.github.com/users/jtnord/orgs","repos_url":"https://api.github.com/users/jtnord/repos","events_url":"https://api.github.com/users/jtnord/events{/privacy}","received_events_url":"https://api.github.com/users/jtnord/received_events","type":"User","site_admin":false},"body":"unique id plugin stored the unique value in the job configuration.\r\n\r\nInitial implementation.\r\n\r\nThere is something very wrong in here as the test case fails randomly - I have not got the the bottom of it and its late so I'm not making good progress :disappointed: \r\n\r\nso @reviewbybees in the hope that someone spots something whilst I am asleep.","created_at":"2015-06-11T03:36:24Z","updated_at":"2015-06-11T08:42:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0b623ae0ba7b872e27c9191ac188885b50619e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/1/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/1/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/issues/1/comments","statuses_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/statuses/b5b5f08cd05556814b9651a135d06b14539eb6a6","head":{"label":"jtnord:JENKINS-28843","ref":"JENKINS-28843","sha":"b5b5f08cd05556814b9651a135d06b14539eb6a6","user":{"login":"jtnord","id":494726,"avatar_url":"https://avatars.githubusercontent.com/u/494726?v=3","gravatar_id":"","url":"https://api.github.com/users/jtnord","html_url":"https://github.com/jtnord","followers_url":"https://api.github.com/users/jtnord/followers","following_url":"https://api.github.com/users/jtnord/following{/other_user}","gists_url":"https://api.github.com/users/jtnord/gists{/gist_id}","starred_url":"https://api.github.com/users/jtnord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtnord/subscriptions","organizations_url":"https://api.github.com/users/jtnord/orgs","repos_url":"https://api.github.com/users/jtnord/repos","events_url":"https://api.github.com/users/jtnord/events{/privacy}","received_events_url":"https://api.github.com/users/jtnord/received_events","type":"User","site_admin":false},"repo":{"id":37209263,"name":"unique-id-plugin","full_name":"jtnord/unique-id-plugin","owner":{"login":"jtnord","id":494726,"avatar_url":"https://avatars.githubusercontent.com/u/494726?v=3","gravatar_id":"","url":"https://api.github.com/users/jtnord","html_url":"https://github.com/jtnord","followers_url":"https://api.github.com/users/jtnord/followers","following_url":"https://api.github.com/users/jtnord/following{/other_user}","gists_url":"https://api.github.com/users/jtnord/gists{/gist_id}","starred_url":"https://api.github.com/users/jtnord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtnord/subscriptions","organizations_url":"https://api.github.com/users/jtnord/orgs","repos_url":"https://api.github.com/users/jtnord/repos","events_url":"https://api.github.com/users/jtnord/events{/privacy}","received_events_url":"https://api.github.com/users/jtnord/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jtnord/unique-id-plugin","description":"","fork":true,"url":"https://api.github.com/repos/jtnord/unique-id-plugin","forks_url":"https://api.github.com/repos/jtnord/unique-id-plugin/forks","keys_url":"https://api.github.com/repos/jtnord/unique-id-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jtnord/unique-id-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jtnord/unique-id-plugin/teams","hooks_url":"https://api.github.com/repos/jtnord/unique-id-plugin/hooks","issue_events_url":"https://api.github.com/repos/jtnord/unique-id-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jtnord/unique-id-plugin/events","assignees_url":"https://api.github.com/repos/jtnord/unique-id-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jtnord/unique-id-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jtnord/unique-id-plugin/tags","blobs_url":"https://api.github.com/repos/jtnord/unique-id-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jtnord/unique-id-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jtnord/unique-id-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jtnord/unique-id-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jtnord/unique-id-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jtnord/unique-id-plugin/languages","stargazers_url":"https://api.github.com/repos/jtnord/unique-id-plugin/stargazers","contributors_url":"https://api.github.com/repos/jtnord/unique-id-plugin/contributors","subscribers_url":"https://api.github.com/repos/jtnord/unique-id-plugin/subscribers","subscription_url":"https://api.github.com/repos/jtnord/unique-id-plugin/subscription","commits_url":"https://api.github.com/repos/jtnord/unique-id-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jtnord/unique-id-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jtnord/unique-id-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jtnord/unique-id-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jtnord/unique-id-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jtnord/unique-id-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jtnord/unique-id-plugin/merges","archive_url":"https://api.github.com/repos/jtnord/unique-id-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jtnord/unique-id-plugin/downloads","issues_url":"https://api.github.com/repos/jtnord/unique-id-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jtnord/unique-id-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jtnord/unique-id-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jtnord/unique-id-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jtnord/unique-id-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jtnord/unique-id-plugin/releases{/id}","created_at":"2015-06-10T16:37:18Z","updated_at":"2015-06-10T16:37:19Z","pushed_at":"2015-06-11T03:33:48Z","git_url":"git://github.com/jtnord/unique-id-plugin.git","ssh_url":"git@github.com:jtnord/unique-id-plugin.git","clone_url":"https://github.com/jtnord/unique-id-plugin.git","svn_url":"https://github.com/jtnord/unique-id-plugin","homepage":null,"size":115,"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":"bf81e96d4b8a7b6aba2437acb675176730bdfcaa","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":26029776,"name":"unique-id-plugin","full_name":"jenkinsci/unique-id-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/unique-id-plugin","description":"","fork":true,"url":"https://api.github.com/repos/jenkinsci/unique-id-plugin","forks_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/unique-id-plugin/releases{/id}","created_at":"2014-10-31T19:11:57Z","updated_at":"2014-10-31T19:29:40Z","pushed_at":"2015-06-11T03:36:25Z","git_url":"git://github.com/jenkinsci/unique-id-plugin.git","ssh_url":"git@github.com:jenkinsci/unique-id-plugin.git","clone_url":"https://github.com/jenkinsci/unique-id-plugin.git","svn_url":"https://github.com/jenkinsci/unique-id-plugin","homepage":null,"size":176,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/1"},"html":{"href":"https://github.com/jenkinsci/unique-id-plugin/pull/1"},"issue":{"href":"https://api.github.com/repos/jenkinsci/unique-id-plugin/issues/1"},"comments":{"href":"https://api.github.com/repos/jenkinsci/unique-id-plugin/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/unique-id-plugin/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/unique-id-plugin/statuses/b5b5f08cd05556814b9651a135d06b14539eb6a6"}}}}