{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments/38401341","id":38401341,"diff_hunk":"@@ -1442,7 +1467,9 @@ public void maintain() {\n                     if (r != null) {\n                         r.run();\n                     } else {\n-                        new BlockedItem(top).enter(this);\n+                        new BuildableItem(top).enter(this);\n+                        new FlyWeightItem(top).enter(this);\n+                        updateSnapshot();","path":"core/src/main/java/hudson/model/Queue.java","position":46,"original_position":46,"commit_id":"dbd1a784a08cbe53081d752aba00e9473747af4c","original_commit_id":"dbd1a784a08cbe53081d752aba00e9473747af4c","user":{"login":"oleg-nenashev","id":3000480,"avatar_url":"https://avatars.githubusercontent.com/u/3000480?v=3","gravatar_id":"","url":"https://api.github.com/users/oleg-nenashev","html_url":"https://github.com/oleg-nenashev","followers_url":"https://api.github.com/users/oleg-nenashev/followers","following_url":"https://api.github.com/users/oleg-nenashev/following{/other_user}","gists_url":"https://api.github.com/users/oleg-nenashev/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg-nenashev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg-nenashev/subscriptions","organizations_url":"https://api.github.com/users/oleg-nenashev/orgs","repos_url":"https://api.github.com/users/oleg-nenashev/repos","events_url":"https://api.github.com/users/oleg-nenashev/events{/privacy}","received_events_url":"https://api.github.com/users/oleg-nenashev/received_events","type":"User","site_admin":false},"body":"Why do you update the snapshot here? Was is an original concurrency issue?","created_at":"2015-09-01T09:38:45Z","updated_at":"2015-09-01T09:38:45Z","html_url":"https://github.com/jenkinsci/jenkins/pull/1815#discussion_r38401341","pull_request_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1815","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments/38401341"},"html":{"href":"https://github.com/jenkinsci/jenkins/pull/1815#discussion_r38401341"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1815"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1815","id":43854784,"html_url":"https://github.com/jenkinsci/jenkins/pull/1815","diff_url":"https://github.com/jenkinsci/jenkins/pull/1815.diff","patch_url":"https://github.com/jenkinsci/jenkins/pull/1815.patch","issue_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/1815","number":1815,"state":"open","locked":false,"title":"[OSS-192]flyweighttasks added to buildables list when the executor is not available","user":{"login":"varmenise","id":5398781,"avatar_url":"https://avatars.githubusercontent.com/u/5398781?v=3","gravatar_id":"","url":"https://api.github.com/users/varmenise","html_url":"https://github.com/varmenise","followers_url":"https://api.github.com/users/varmenise/followers","following_url":"https://api.github.com/users/varmenise/following{/other_user}","gists_url":"https://api.github.com/users/varmenise/gists{/gist_id}","starred_url":"https://api.github.com/users/varmenise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varmenise/subscriptions","organizations_url":"https://api.github.com/users/varmenise/orgs","repos_url":"https://api.github.com/users/varmenise/repos","events_url":"https://api.github.com/users/varmenise/events{/privacy}","received_events_url":"https://api.github.com/users/varmenise/received_events","type":"User","site_admin":false},"body":"This is to make the flyweight tasks to be part of the buildable list if the executor they are restricted to run on (if any) is not available and needs to be provisioned. See: https://cloudbees.atlassian.net/browse/OSS-192\r\n\r\nAt the moment if a flyweight task is restricted to a specific node, but the node is offline, we put the task in blocked-state. At the next iteration we check if the node is online, if not we leave the task in the blocked queue. This means we never ask the node to be provisioned.\r\n\r\nThis fix creates a buildable item if no executors are available, so that the node can be provisioned. Once the node is provisioned, the task is executed and the item removed from the list.","created_at":"2015-09-01T09:29:08Z","updated_at":"2015-09-01T09:38:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a41c54fc7b72633df30f4b638aa2a791741885b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1815/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1815/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/1815/comments","statuses_url":"https://api.github.com/repos/jenkinsci/jenkins/statuses/dbd1a784a08cbe53081d752aba00e9473747af4c","head":{"label":"varmenise:OSS-192","ref":"OSS-192","sha":"dbd1a784a08cbe53081d752aba00e9473747af4c","user":{"login":"varmenise","id":5398781,"avatar_url":"https://avatars.githubusercontent.com/u/5398781?v=3","gravatar_id":"","url":"https://api.github.com/users/varmenise","html_url":"https://github.com/varmenise","followers_url":"https://api.github.com/users/varmenise/followers","following_url":"https://api.github.com/users/varmenise/following{/other_user}","gists_url":"https://api.github.com/users/varmenise/gists{/gist_id}","starred_url":"https://api.github.com/users/varmenise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varmenise/subscriptions","organizations_url":"https://api.github.com/users/varmenise/orgs","repos_url":"https://api.github.com/users/varmenise/repos","events_url":"https://api.github.com/users/varmenise/events{/privacy}","received_events_url":"https://api.github.com/users/varmenise/received_events","type":"User","site_admin":false},"repo":{"id":32006767,"name":"jenkins","full_name":"varmenise/jenkins","owner":{"login":"varmenise","id":5398781,"avatar_url":"https://avatars.githubusercontent.com/u/5398781?v=3","gravatar_id":"","url":"https://api.github.com/users/varmenise","html_url":"https://github.com/varmenise","followers_url":"https://api.github.com/users/varmenise/followers","following_url":"https://api.github.com/users/varmenise/following{/other_user}","gists_url":"https://api.github.com/users/varmenise/gists{/gist_id}","starred_url":"https://api.github.com/users/varmenise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varmenise/subscriptions","organizations_url":"https://api.github.com/users/varmenise/orgs","repos_url":"https://api.github.com/users/varmenise/repos","events_url":"https://api.github.com/users/varmenise/events{/privacy}","received_events_url":"https://api.github.com/users/varmenise/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/varmenise/jenkins","description":"Jenkins Continuous Integration Server","fork":true,"url":"https://api.github.com/repos/varmenise/jenkins","forks_url":"https://api.github.com/repos/varmenise/jenkins/forks","keys_url":"https://api.github.com/repos/varmenise/jenkins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/varmenise/jenkins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/varmenise/jenkins/teams","hooks_url":"https://api.github.com/repos/varmenise/jenkins/hooks","issue_events_url":"https://api.github.com/repos/varmenise/jenkins/issues/events{/number}","events_url":"https://api.github.com/repos/varmenise/jenkins/events","assignees_url":"https://api.github.com/repos/varmenise/jenkins/assignees{/user}","branches_url":"https://api.github.com/repos/varmenise/jenkins/branches{/branch}","tags_url":"https://api.github.com/repos/varmenise/jenkins/tags","blobs_url":"https://api.github.com/repos/varmenise/jenkins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/varmenise/jenkins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/varmenise/jenkins/git/refs{/sha}","trees_url":"https://api.github.com/repos/varmenise/jenkins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/varmenise/jenkins/statuses/{sha}","languages_url":"https://api.github.com/repos/varmenise/jenkins/languages","stargazers_url":"https://api.github.com/repos/varmenise/jenkins/stargazers","contributors_url":"https://api.github.com/repos/varmenise/jenkins/contributors","subscribers_url":"https://api.github.com/repos/varmenise/jenkins/subscribers","subscription_url":"https://api.github.com/repos/varmenise/jenkins/subscription","commits_url":"https://api.github.com/repos/varmenise/jenkins/commits{/sha}","git_commits_url":"https://api.github.com/repos/varmenise/jenkins/git/commits{/sha}","comments_url":"https://api.github.com/repos/varmenise/jenkins/comments{/number}","issue_comment_url":"https://api.github.com/repos/varmenise/jenkins/issues/comments{/number}","contents_url":"https://api.github.com/repos/varmenise/jenkins/contents/{+path}","compare_url":"https://api.github.com/repos/varmenise/jenkins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/varmenise/jenkins/merges","archive_url":"https://api.github.com/repos/varmenise/jenkins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/varmenise/jenkins/downloads","issues_url":"https://api.github.com/repos/varmenise/jenkins/issues{/number}","pulls_url":"https://api.github.com/repos/varmenise/jenkins/pulls{/number}","milestones_url":"https://api.github.com/repos/varmenise/jenkins/milestones{/number}","notifications_url":"https://api.github.com/repos/varmenise/jenkins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/varmenise/jenkins/labels{/name}","releases_url":"https://api.github.com/repos/varmenise/jenkins/releases{/id}","created_at":"2015-03-11T08:36:10Z","updated_at":"2015-03-11T08:36:33Z","pushed_at":"2015-09-01T09:24:01Z","git_url":"git://github.com/varmenise/jenkins.git","ssh_url":"git@github.com:varmenise/jenkins.git","clone_url":"https://github.com/varmenise/jenkins.git","svn_url":"https://github.com/varmenise/jenkins","homepage":"http://jenkins-ci.org/","size":398719,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"69a98484c8a879fef9532e68670e72f5d74267b7","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}","created_at":"2010-11-22T21:21:23Z","updated_at":"2015-09-01T09:35:39Z","pushed_at":"2015-09-01T09:29:09Z","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":"http://jenkins-ci.org/","size":449846,"stargazers_count":4461,"watchers_count":4461,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1984,"mirror_url":null,"open_issues_count":113,"forks":1984,"open_issues":113,"watchers":4461,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1815"},"html":{"href":"https://github.com/jenkinsci/jenkins/pull/1815"},"issue":{"href":"https://api.github.com/repos/jenkinsci/jenkins/issues/1815"},"comments":{"href":"https://api.github.com/repos/jenkinsci/jenkins/issues/1815/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1815/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1815/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/jenkins/statuses/dbd1a784a08cbe53081d752aba00e9473747af4c"}}}}