{"action":"created","comment":{"url":"https://api.github.com/repos/RackHD/RackHD/pulls/comments/104870922","pull_request_review_id":25724131,"id":104870922,"diff_hunk":"@@ -160,16 +160,28 @@ def get_sku_nodes(self):\n                     data = loads(self.__client.last_response.data)\n                     sku_id = data['id']\n                     LOG.info(\"ID of the posted sku is:   \"+ sku_id)\n-                    time.sleep(3)\n                     assert_equal(201, result.status, message=result.reason)\n                     LOG.info(\"node_id \" + node_id)\n \n-                    #Validate that the sku element in the node has been updated with the right sku ID\n-                    Api().nodes_get_by_id(identifier=node_id)\n-                    updated_node = loads(self.__client.last_response.data)\n-                    LOG.info(\"updated_noded is : {0}\".format(updated_node))\n-                    arr =updated_node['sku'].split(\"/\")\n-                    assert_equal(sku_id, arr[4])\n+                    # Give enough time to wait the sku discovery finishes\n+                    time.sleep(3)\n+                    retries = 10\n+                    while retries > 0:\n+                        Api().nodes_get_by_id(identifier=node_id)\n+                        updated_node = loads(self.__client.last_response.data)\n+                        if updated_node['sku'] is not None:\n+                            # Ensure the sku element in the node has been updated with the right sku ID\n+                            arr = updated_node['sku'].split(\"/\")\n+                            if sku_id == arr[4]:\n+                                LOG.info(\"updated_noded is : {0}\".format(updated_node))\n+                                break\n+\n+                        retries = retries - 1\n+                        if retries == 0:\n+                            raise Error(\"The node {0} never be assigned with the new sku {1}\".format(node_id, sku_id)\n+                        else:","path":"test/tests/api/v2_0/skupack_tests.py","position":30,"original_position":30,"commit_id":"ed6d486704048c7b5181c8cd23ea20419337a117","original_commit_id":"ed6d486704048c7b5181c8cd23ea20419337a117","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars3.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"SyntaxError: invalid syntax","created_at":"2017-03-08T08:57:50Z","updated_at":"2017-03-08T08:57:50Z","html_url":"https://github.com/RackHD/RackHD/pull/661#discussion_r104870922","pull_request_url":"https://api.github.com/repos/RackHD/RackHD/pulls/661","_links":{"self":{"href":"https://api.github.com/repos/RackHD/RackHD/pulls/comments/104870922"},"html":{"href":"https://github.com/RackHD/RackHD/pull/661#discussion_r104870922"},"pull_request":{"href":"https://api.github.com/repos/RackHD/RackHD/pulls/661"}}},"pull_request":{"url":"https://api.github.com/repos/RackHD/RackHD/pulls/661","id":109653046,"html_url":"https://github.com/RackHD/RackHD/pull/661","diff_url":"https://github.com/RackHD/RackHD/pull/661.diff","patch_url":"https://github.com/RackHD/RackHD/pull/661.patch","issue_url":"https://api.github.com/repos/RackHD/RackHD/issues/661","number":661,"state":"open","locked":false,"title":"Add more delay for post sku test case","user":{"login":"yyscamper","id":511378,"avatar_url":"https://avatars1.githubusercontent.com/u/511378?v=3","gravatar_id":"","url":"https://api.github.com/users/yyscamper","html_url":"https://github.com/yyscamper","followers_url":"https://api.github.com/users/yyscamper/followers","following_url":"https://api.github.com/users/yyscamper/following{/other_user}","gists_url":"https://api.github.com/users/yyscamper/gists{/gist_id}","starred_url":"https://api.github.com/users/yyscamper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyscamper/subscriptions","organizations_url":"https://api.github.com/users/yyscamper/orgs","repos_url":"https://api.github.com/users/yyscamper/repos","events_url":"https://api.github.com/users/yyscamper/events{/privacy}","received_events_url":"https://api.github.com/users/yyscamper/received_events","type":"User","site_admin":false},"body":"After posting the sku, the RackHD will run sku discovery workflow and assign the node with new sku. Previously the test case hard-codes to wait only 3 sec. But we found this delay is not enough in some system, and the Jenkins continuous smoke test occasionally reports this test case failure.\r\n\r\nThis is one of the failure job: \r\nhttp://rackhdci.lss.emc.com/job/Templates/job/SmokeTest-CIT/1321/ \r\n\r\nBelow is the log that captured from jenkins, you could see it took more than 4 sec to finish the new sku discovery.\r\n\r\n- The time when RackHD receives the request to create sku.\r\n```\r\n1|on-http  | [debug] [2017-03-03T06:06:29.120Z] [on-http] [Http.Server] [Server] http: POST 201 927.742 - f1a5fdcf-fbb7-4aa0-a398-d9ac8dfabc1c - /api/2.0/skus\r\n```\r\n\r\n- The time when the target node is successfully assigned with the new sku:\r\n```\r\n0|on-taskg | [debug] [2017-03-03T06:06:33.297Z] [on-taskgraph] [Job.Catalog.GenerateSku] [7134f4] SKU mytestsku matched 100%\r\n0|on-taskg |  -> /node_modules/on-tasks/lib/jobs/generate-sku.js:90\r\n0|on-taskg | sku: bc51a37c-b53b-471e-832f-001c66ac6b45\r\n0|on-taskg | [info] [2017-03-03T06:06:33.314Z] [on-taskgraph] [Job.Catalog.GenerateSku] [7134f4] Assigning SKU mytestsku\r\n```\r\n\r\n@tannoa2 @pengz1 @nortonluo @sunnyqianzhang @iceiilin @anhou ","created_at":"2017-03-08T08:57:43Z","updated_at":"2017-03-08T08:57:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47bcbd7c4cda76e72712aabd9040875c35d787b6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/RackHD/RackHD/pulls/661/commits","review_comments_url":"https://api.github.com/repos/RackHD/RackHD/pulls/661/comments","review_comment_url":"https://api.github.com/repos/RackHD/RackHD/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RackHD/RackHD/issues/661/comments","statuses_url":"https://api.github.com/repos/RackHD/RackHD/statuses/ed6d486704048c7b5181c8cd23ea20419337a117","head":{"label":"yyscamper:fix-skupack-test-defect","ref":"fix-skupack-test-defect","sha":"ed6d486704048c7b5181c8cd23ea20419337a117","user":{"login":"yyscamper","id":511378,"avatar_url":"https://avatars1.githubusercontent.com/u/511378?v=3","gravatar_id":"","url":"https://api.github.com/users/yyscamper","html_url":"https://github.com/yyscamper","followers_url":"https://api.github.com/users/yyscamper/followers","following_url":"https://api.github.com/users/yyscamper/following{/other_user}","gists_url":"https://api.github.com/users/yyscamper/gists{/gist_id}","starred_url":"https://api.github.com/users/yyscamper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyscamper/subscriptions","organizations_url":"https://api.github.com/users/yyscamper/orgs","repos_url":"https://api.github.com/users/yyscamper/repos","events_url":"https://api.github.com/users/yyscamper/events{/privacy}","received_events_url":"https://api.github.com/users/yyscamper/received_events","type":"User","site_admin":false},"repo":{"id":53565514,"name":"RackHD","full_name":"yyscamper/RackHD","owner":{"login":"yyscamper","id":511378,"avatar_url":"https://avatars1.githubusercontent.com/u/511378?v=3","gravatar_id":"","url":"https://api.github.com/users/yyscamper","html_url":"https://github.com/yyscamper","followers_url":"https://api.github.com/users/yyscamper/followers","following_url":"https://api.github.com/users/yyscamper/following{/other_user}","gists_url":"https://api.github.com/users/yyscamper/gists{/gist_id}","starred_url":"https://api.github.com/users/yyscamper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyscamper/subscriptions","organizations_url":"https://api.github.com/users/yyscamper/orgs","repos_url":"https://api.github.com/users/yyscamper/repos","events_url":"https://api.github.com/users/yyscamper/events{/privacy}","received_events_url":"https://api.github.com/users/yyscamper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yyscamper/RackHD","description":"RackHD™ provides hardware management and orchestration services","fork":true,"url":"https://api.github.com/repos/yyscamper/RackHD","forks_url":"https://api.github.com/repos/yyscamper/RackHD/forks","keys_url":"https://api.github.com/repos/yyscamper/RackHD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yyscamper/RackHD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yyscamper/RackHD/teams","hooks_url":"https://api.github.com/repos/yyscamper/RackHD/hooks","issue_events_url":"https://api.github.com/repos/yyscamper/RackHD/issues/events{/number}","events_url":"https://api.github.com/repos/yyscamper/RackHD/events","assignees_url":"https://api.github.com/repos/yyscamper/RackHD/assignees{/user}","branches_url":"https://api.github.com/repos/yyscamper/RackHD/branches{/branch}","tags_url":"https://api.github.com/repos/yyscamper/RackHD/tags","blobs_url":"https://api.github.com/repos/yyscamper/RackHD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yyscamper/RackHD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yyscamper/RackHD/git/refs{/sha}","trees_url":"https://api.github.com/repos/yyscamper/RackHD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yyscamper/RackHD/statuses/{sha}","languages_url":"https://api.github.com/repos/yyscamper/RackHD/languages","stargazers_url":"https://api.github.com/repos/yyscamper/RackHD/stargazers","contributors_url":"https://api.github.com/repos/yyscamper/RackHD/contributors","subscribers_url":"https://api.github.com/repos/yyscamper/RackHD/subscribers","subscription_url":"https://api.github.com/repos/yyscamper/RackHD/subscription","commits_url":"https://api.github.com/repos/yyscamper/RackHD/commits{/sha}","git_commits_url":"https://api.github.com/repos/yyscamper/RackHD/git/commits{/sha}","comments_url":"https://api.github.com/repos/yyscamper/RackHD/comments{/number}","issue_comment_url":"https://api.github.com/repos/yyscamper/RackHD/issues/comments{/number}","contents_url":"https://api.github.com/repos/yyscamper/RackHD/contents/{+path}","compare_url":"https://api.github.com/repos/yyscamper/RackHD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yyscamper/RackHD/merges","archive_url":"https://api.github.com/repos/yyscamper/RackHD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yyscamper/RackHD/downloads","issues_url":"https://api.github.com/repos/yyscamper/RackHD/issues{/number}","pulls_url":"https://api.github.com/repos/yyscamper/RackHD/pulls{/number}","milestones_url":"https://api.github.com/repos/yyscamper/RackHD/milestones{/number}","notifications_url":"https://api.github.com/repos/yyscamper/RackHD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yyscamper/RackHD/labels{/name}","releases_url":"https://api.github.com/repos/yyscamper/RackHD/releases{/id}","deployments_url":"https://api.github.com/repos/yyscamper/RackHD/deployments","created_at":"2016-03-10T07:47:53Z","updated_at":"2016-03-10T07:47:54Z","pushed_at":"2017-03-08T08:52:11Z","git_url":"git://github.com/yyscamper/RackHD.git","ssh_url":"git@github.com:yyscamper/RackHD.git","clone_url":"https://github.com/yyscamper/RackHD.git","svn_url":"https://github.com/yyscamper/RackHD","homepage":"http://rackhd.github.io/RackHD","size":3065,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"RackHD:master","ref":"master","sha":"c585ea6a51d1d98e8f1812d7a7e91f1a0c4b6e92","user":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars1.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"repo":{"id":45687347,"name":"RackHD","full_name":"RackHD/RackHD","owner":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars1.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RackHD/RackHD","description":"RackHD™ provides hardware management and orchestration services","fork":false,"url":"https://api.github.com/repos/RackHD/RackHD","forks_url":"https://api.github.com/repos/RackHD/RackHD/forks","keys_url":"https://api.github.com/repos/RackHD/RackHD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RackHD/RackHD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RackHD/RackHD/teams","hooks_url":"https://api.github.com/repos/RackHD/RackHD/hooks","issue_events_url":"https://api.github.com/repos/RackHD/RackHD/issues/events{/number}","events_url":"https://api.github.com/repos/RackHD/RackHD/events","assignees_url":"https://api.github.com/repos/RackHD/RackHD/assignees{/user}","branches_url":"https://api.github.com/repos/RackHD/RackHD/branches{/branch}","tags_url":"https://api.github.com/repos/RackHD/RackHD/tags","blobs_url":"https://api.github.com/repos/RackHD/RackHD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RackHD/RackHD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RackHD/RackHD/git/refs{/sha}","trees_url":"https://api.github.com/repos/RackHD/RackHD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RackHD/RackHD/statuses/{sha}","languages_url":"https://api.github.com/repos/RackHD/RackHD/languages","stargazers_url":"https://api.github.com/repos/RackHD/RackHD/stargazers","contributors_url":"https://api.github.com/repos/RackHD/RackHD/contributors","subscribers_url":"https://api.github.com/repos/RackHD/RackHD/subscribers","subscription_url":"https://api.github.com/repos/RackHD/RackHD/subscription","commits_url":"https://api.github.com/repos/RackHD/RackHD/commits{/sha}","git_commits_url":"https://api.github.com/repos/RackHD/RackHD/git/commits{/sha}","comments_url":"https://api.github.com/repos/RackHD/RackHD/comments{/number}","issue_comment_url":"https://api.github.com/repos/RackHD/RackHD/issues/comments{/number}","contents_url":"https://api.github.com/repos/RackHD/RackHD/contents/{+path}","compare_url":"https://api.github.com/repos/RackHD/RackHD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RackHD/RackHD/merges","archive_url":"https://api.github.com/repos/RackHD/RackHD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RackHD/RackHD/downloads","issues_url":"https://api.github.com/repos/RackHD/RackHD/issues{/number}","pulls_url":"https://api.github.com/repos/RackHD/RackHD/pulls{/number}","milestones_url":"https://api.github.com/repos/RackHD/RackHD/milestones{/number}","notifications_url":"https://api.github.com/repos/RackHD/RackHD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RackHD/RackHD/labels{/name}","releases_url":"https://api.github.com/repos/RackHD/RackHD/releases{/id}","deployments_url":"https://api.github.com/repos/RackHD/RackHD/deployments","created_at":"2015-11-06T14:42:16Z","updated_at":"2017-03-08T03:00:52Z","pushed_at":"2017-03-08T08:57:44Z","git_url":"git://github.com/RackHD/RackHD.git","ssh_url":"git@github.com:RackHD/RackHD.git","clone_url":"https://github.com/RackHD/RackHD.git","svn_url":"https://github.com/RackHD/RackHD","homepage":"http://rackhd.readthedocs.io/","size":3090,"stargazers_count":216,"watchers_count":216,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":101,"mirror_url":null,"open_issues_count":89,"forks":101,"open_issues":89,"watchers":216,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RackHD/RackHD/pulls/661"},"html":{"href":"https://github.com/RackHD/RackHD/pull/661"},"issue":{"href":"https://api.github.com/repos/RackHD/RackHD/issues/661"},"comments":{"href":"https://api.github.com/repos/RackHD/RackHD/issues/661/comments"},"review_comments":{"href":"https://api.github.com/repos/RackHD/RackHD/pulls/661/comments"},"review_comment":{"href":"https://api.github.com/repos/RackHD/RackHD/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RackHD/RackHD/pulls/661/commits"},"statuses":{"href":"https://api.github.com/repos/RackHD/RackHD/statuses/ed6d486704048c7b5181c8cd23ea20419337a117"}}}}
{"actor":{"display_login":"houndci-bot"}}