{"action":"created","comment":{"url":"https://api.github.com/repos/scality/Zenko/pulls/comments/206645485","pull_request_review_id":142089887,"id":206645485,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjY0NTQ4NQ==","diff_hunk":"@@ -99,66 +144,48 @@ describe.skip('Backbeat replication metrics', function dF() {\n                         assert(byteResult - prevDataBytes === 100);\n \n                         const throughputSize = body.throughput.results.size;\n-                        assert(throughputSize > 0);\n+                        assert(throughputSize >= 0);\n                         next();\n                     });\n                 }),\n         ], done);\n     });\n \n-    it('should get metrics when specifying metric type', done => series([\n-        next => scalityUtils.putObject(srcBucket, key, Buffer.alloc(100), next),\n-        next => scalityUtils.compareObjectsAWS(srcBucket, destBucket, key,\n-            undefined, next),\n-        next => makeGETRequest('/_/backbeat/api/metrics/crr/all/backlog',\n-            (err, res) => {\n-                assert.ifError(err);\n-                assert.equal(res.statusCode, 200);\n-                getResponseBody(res, (err, body) => {\n-                    assert.ifError(err);\n-                    const keys = Object.keys(body);\n-                    assert.strictEqual(keys.length, 1);\n-                    assert.strictEqual(keys[0], 'backlog');\n+    it('should get object-level progress metrics', done => {\n+        let versionId;\n+        const destinationKey = `${srcBucket}/${key}`;\n \n-                    assert(body.backlog.description);\n-                    assert(body.backlog.results);\n-                    const resultKeys = Object.keys(body.backlog.results);\n-                    assert(resultKeys.includes('count'));\n-                    assert(resultKeys.includes('size'));\n+        series([\n+            next => scalityUtils.putObject(srcBucket, key, Buffer.alloc(10000),\n+                (err, res) => {\n+                    assert.ifError(err);\n+                    versionId = res.VersionId;\n                     next();\n-                });\n-            }),\n-    ], done));\n-\n-    it('should get metrics when specifying valid site', done => series([\n-        next => scalityUtils.putObject(srcBucket, key, Buffer.alloc(100), next),\n-        next => scalityUtils.compareObjectsAWS(srcBucket, destBucket, key,\n-            undefined, next),\n-        next => makeGETRequest(\n-            `/_/backbeat/api/metrics/crr/${destLocation}`,\n-            (err, res) => {\n-                assert.ifError(err);\n-                assert.equal(res.statusCode, 200);\n-                getResponseBody(res, (err, body) => {\n+                }),\n+            next => scalityUtils.compareObjectsAWS(srcBucket, awsDestBucket, key,\n+                undefined, next),\n+            next => makeDelayedGETRequest('/_/backbeat/api/metrics/crr/' +\n+                `${destAWSLocation}/progress/${awsDestBucket}/` +\n+                `${destinationKey}?versionId=${versionId}`,\n+                (err, res) => {\n                     assert.ifError(err);\n-                    const metricTypes = ['backlog', 'completions', 'throughput',\n-                        'failures'];\n-                    const keys = Object.keys(body);\n-                    keys.forEach(key => {\n-                        assert(metricTypes.includes(key));\n-                        assert(body[key].description);\n-                        assert(body[key].results);\n-                        const resultKeys = Object.keys(body[key].results);\n-                        assert(resultKeys.includes('count'));\n-                        assert(resultKeys.includes('size'));\n-                    });\n+                    assert.equal(res.statusCode, 200);\n \n-                    next();\n-                });\n-            }),\n-    ], done));\n+                    getResponseBody(res, (err, body) => {\n+                        assert.ifError(err);\n+                        const keys = Object.keys(body);\n+                        assert(keys.includes('description'));\n+                        assert(keys.includes('pending'));\n+                        assert(keys.includes('completed'));\n+                        assert(keys.includes('progress'));\n+\n+                        next();\n+                    });\n+                }),\n+        ], done);\n+    });\n \n-    it('should get bucket-level throughput metrics', done => {\n+    it('should get object-level throughput metrics', done => {","path":"tests/backbeat/tests/api/metrics.js","position":248,"original_position":248,"commit_id":"9667f801b785e57bd5e5c7e5d52ea796a07917e4","original_commit_id":"9667f801b785e57bd5e5c7e5d52ea796a07917e4","user":{"login":"bennettbuchanan","id":15207067,"node_id":"MDQ6VXNlcjE1MjA3MDY3","avatar_url":"https://avatars0.githubusercontent.com/u/15207067?v=4","gravatar_id":"","url":"https://api.github.com/users/bennettbuchanan","html_url":"https://github.com/bennettbuchanan","followers_url":"https://api.github.com/users/bennettbuchanan/followers","following_url":"https://api.github.com/users/bennettbuchanan/following{/other_user}","gists_url":"https://api.github.com/users/bennettbuchanan/gists{/gist_id}","starred_url":"https://api.github.com/users/bennettbuchanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bennettbuchanan/subscriptions","organizations_url":"https://api.github.com/users/bennettbuchanan/orgs","repos_url":"https://api.github.com/users/bennettbuchanan/repos","events_url":"https://api.github.com/users/bennettbuchanan/events{/privacy}","received_events_url":"https://api.github.com/users/bennettbuchanan/received_events","type":"User","site_admin":false},"body":"This PR https://github.com/scality/Zenko/pull/221 should handle this test case as well. Probably a refactor is in order to move all the backbeat API tests into a single file. ","created_at":"2018-07-31T18:56:50Z","updated_at":"2018-07-31T18:57:19Z","html_url":"https://github.com/scality/Zenko/pull/239#discussion_r206645485","pull_request_url":"https://api.github.com/repos/scality/Zenko/pulls/239","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/scality/Zenko/pulls/comments/206645485"},"html":{"href":"https://github.com/scality/Zenko/pull/239#discussion_r206645485"},"pull_request":{"href":"https://api.github.com/repos/scality/Zenko/pulls/239"}}},"pull_request":{"url":"https://api.github.com/repos/scality/Zenko/pulls/239","id":205021620,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MDIxNjIw","html_url":"https://github.com/scality/Zenko/pull/239","diff_url":"https://github.com/scality/Zenko/pull/239.diff","patch_url":"https://github.com/scality/Zenko/pull/239.patch","issue_url":"https://api.github.com/repos/scality/Zenko/issues/239","number":239,"state":"open","locked":false,"title":"ft: update crr metrics e2e tests","user":{"login":"philipyoo","id":11511641,"node_id":"MDQ6VXNlcjExNTExNjQx","avatar_url":"https://avatars2.githubusercontent.com/u/11511641?v=4","gravatar_id":"","url":"https://api.github.com/users/philipyoo","html_url":"https://github.com/philipyoo","followers_url":"https://api.github.com/users/philipyoo/followers","following_url":"https://api.github.com/users/philipyoo/following{/other_user}","gists_url":"https://api.github.com/users/philipyoo/gists{/gist_id}","starred_url":"https://api.github.com/users/philipyoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipyoo/subscriptions","organizations_url":"https://api.github.com/users/philipyoo/orgs","repos_url":"https://api.github.com/users/philipyoo/repos","events_url":"https://api.github.com/users/philipyoo/events{/privacy}","received_events_url":"https://api.github.com/users/philipyoo/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-31T07:36:23Z","updated_at":"2018-07-31T18:57:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2aa9184c35217e870a2260e7592a8cb20ba99a36","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scality/Zenko/pulls/239/commits","review_comments_url":"https://api.github.com/repos/scality/Zenko/pulls/239/comments","review_comment_url":"https://api.github.com/repos/scality/Zenko/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scality/Zenko/issues/239/comments","statuses_url":"https://api.github.com/repos/scality/Zenko/statuses/9667f801b785e57bd5e5c7e5d52ea796a07917e4","head":{"label":"scality:feature/ZENKO-788-crrMetricE2E","ref":"feature/ZENKO-788-crrMetricE2E","sha":"9667f801b785e57bd5e5c7e5d52ea796a07917e4","user":{"login":"scality","id":383812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MzgxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/383812?v=4","gravatar_id":"","url":"https://api.github.com/users/scality","html_url":"https://github.com/scality","followers_url":"https://api.github.com/users/scality/followers","following_url":"https://api.github.com/users/scality/following{/other_user}","gists_url":"https://api.github.com/users/scality/gists{/gist_id}","starred_url":"https://api.github.com/users/scality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scality/subscriptions","organizations_url":"https://api.github.com/users/scality/orgs","repos_url":"https://api.github.com/users/scality/repos","events_url":"https://api.github.com/users/scality/events{/privacy}","received_events_url":"https://api.github.com/users/scality/received_events","type":"Organization","site_admin":false},"repo":{"id":93576430,"node_id":"MDEwOlJlcG9zaXRvcnk5MzU3NjQzMA==","name":"Zenko","full_name":"scality/Zenko","owner":{"login":"scality","id":383812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MzgxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/383812?v=4","gravatar_id":"","url":"https://api.github.com/users/scality","html_url":"https://github.com/scality","followers_url":"https://api.github.com/users/scality/followers","following_url":"https://api.github.com/users/scality/following{/other_user}","gists_url":"https://api.github.com/users/scality/gists{/gist_id}","starred_url":"https://api.github.com/users/scality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scality/subscriptions","organizations_url":"https://api.github.com/users/scality/orgs","repos_url":"https://api.github.com/users/scality/repos","events_url":"https://api.github.com/users/scality/events{/privacy}","received_events_url":"https://api.github.com/users/scality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scality/Zenko","description":"Zenko is the open source multi-cloud data controller: own and keep control of your data on any cloud.","fork":false,"url":"https://api.github.com/repos/scality/Zenko","forks_url":"https://api.github.com/repos/scality/Zenko/forks","keys_url":"https://api.github.com/repos/scality/Zenko/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scality/Zenko/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scality/Zenko/teams","hooks_url":"https://api.github.com/repos/scality/Zenko/hooks","issue_events_url":"https://api.github.com/repos/scality/Zenko/issues/events{/number}","events_url":"https://api.github.com/repos/scality/Zenko/events","assignees_url":"https://api.github.com/repos/scality/Zenko/assignees{/user}","branches_url":"https://api.github.com/repos/scality/Zenko/branches{/branch}","tags_url":"https://api.github.com/repos/scality/Zenko/tags","blobs_url":"https://api.github.com/repos/scality/Zenko/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scality/Zenko/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scality/Zenko/git/refs{/sha}","trees_url":"https://api.github.com/repos/scality/Zenko/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scality/Zenko/statuses/{sha}","languages_url":"https://api.github.com/repos/scality/Zenko/languages","stargazers_url":"https://api.github.com/repos/scality/Zenko/stargazers","contributors_url":"https://api.github.com/repos/scality/Zenko/contributors","subscribers_url":"https://api.github.com/repos/scality/Zenko/subscribers","subscription_url":"https://api.github.com/repos/scality/Zenko/subscription","commits_url":"https://api.github.com/repos/scality/Zenko/commits{/sha}","git_commits_url":"https://api.github.com/repos/scality/Zenko/git/commits{/sha}","comments_url":"https://api.github.com/repos/scality/Zenko/comments{/number}","issue_comment_url":"https://api.github.com/repos/scality/Zenko/issues/comments{/number}","contents_url":"https://api.github.com/repos/scality/Zenko/contents/{+path}","compare_url":"https://api.github.com/repos/scality/Zenko/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scality/Zenko/merges","archive_url":"https://api.github.com/repos/scality/Zenko/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scality/Zenko/downloads","issues_url":"https://api.github.com/repos/scality/Zenko/issues{/number}","pulls_url":"https://api.github.com/repos/scality/Zenko/pulls{/number}","milestones_url":"https://api.github.com/repos/scality/Zenko/milestones{/number}","notifications_url":"https://api.github.com/repos/scality/Zenko/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scality/Zenko/labels{/name}","releases_url":"https://api.github.com/repos/scality/Zenko/releases{/id}","deployments_url":"https://api.github.com/repos/scality/Zenko/deployments","created_at":"2017-06-07T00:53:14Z","updated_at":"2018-07-30T23:26:01Z","pushed_at":"2018-07-31T18:42:31Z","git_url":"git://github.com/scality/Zenko.git","ssh_url":"git@github.com:scality/Zenko.git","clone_url":"https://github.com/scality/Zenko.git","svn_url":"https://github.com/scality/Zenko","homepage":"https://www.zenko.io","size":1327,"stargazers_count":148,"watchers_count":148,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":38,"open_issues":27,"watchers":148,"default_branch":"development/0.9"}},"base":{"label":"scality:development/0.9","ref":"development/0.9","sha":"4d8f98ff303a3f5bd7e29ca2269c9883bbcd481d","user":{"login":"scality","id":383812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MzgxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/383812?v=4","gravatar_id":"","url":"https://api.github.com/users/scality","html_url":"https://github.com/scality","followers_url":"https://api.github.com/users/scality/followers","following_url":"https://api.github.com/users/scality/following{/other_user}","gists_url":"https://api.github.com/users/scality/gists{/gist_id}","starred_url":"https://api.github.com/users/scality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scality/subscriptions","organizations_url":"https://api.github.com/users/scality/orgs","repos_url":"https://api.github.com/users/scality/repos","events_url":"https://api.github.com/users/scality/events{/privacy}","received_events_url":"https://api.github.com/users/scality/received_events","type":"Organization","site_admin":false},"repo":{"id":93576430,"node_id":"MDEwOlJlcG9zaXRvcnk5MzU3NjQzMA==","name":"Zenko","full_name":"scality/Zenko","owner":{"login":"scality","id":383812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MzgxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/383812?v=4","gravatar_id":"","url":"https://api.github.com/users/scality","html_url":"https://github.com/scality","followers_url":"https://api.github.com/users/scality/followers","following_url":"https://api.github.com/users/scality/following{/other_user}","gists_url":"https://api.github.com/users/scality/gists{/gist_id}","starred_url":"https://api.github.com/users/scality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scality/subscriptions","organizations_url":"https://api.github.com/users/scality/orgs","repos_url":"https://api.github.com/users/scality/repos","events_url":"https://api.github.com/users/scality/events{/privacy}","received_events_url":"https://api.github.com/users/scality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scality/Zenko","description":"Zenko is the open source multi-cloud data controller: own and keep control of your data on any cloud.","fork":false,"url":"https://api.github.com/repos/scality/Zenko","forks_url":"https://api.github.com/repos/scality/Zenko/forks","keys_url":"https://api.github.com/repos/scality/Zenko/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scality/Zenko/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scality/Zenko/teams","hooks_url":"https://api.github.com/repos/scality/Zenko/hooks","issue_events_url":"https://api.github.com/repos/scality/Zenko/issues/events{/number}","events_url":"https://api.github.com/repos/scality/Zenko/events","assignees_url":"https://api.github.com/repos/scality/Zenko/assignees{/user}","branches_url":"https://api.github.com/repos/scality/Zenko/branches{/branch}","tags_url":"https://api.github.com/repos/scality/Zenko/tags","blobs_url":"https://api.github.com/repos/scality/Zenko/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scality/Zenko/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scality/Zenko/git/refs{/sha}","trees_url":"https://api.github.com/repos/scality/Zenko/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scality/Zenko/statuses/{sha}","languages_url":"https://api.github.com/repos/scality/Zenko/languages","stargazers_url":"https://api.github.com/repos/scality/Zenko/stargazers","contributors_url":"https://api.github.com/repos/scality/Zenko/contributors","subscribers_url":"https://api.github.com/repos/scality/Zenko/subscribers","subscription_url":"https://api.github.com/repos/scality/Zenko/subscription","commits_url":"https://api.github.com/repos/scality/Zenko/commits{/sha}","git_commits_url":"https://api.github.com/repos/scality/Zenko/git/commits{/sha}","comments_url":"https://api.github.com/repos/scality/Zenko/comments{/number}","issue_comment_url":"https://api.github.com/repos/scality/Zenko/issues/comments{/number}","contents_url":"https://api.github.com/repos/scality/Zenko/contents/{+path}","compare_url":"https://api.github.com/repos/scality/Zenko/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scality/Zenko/merges","archive_url":"https://api.github.com/repos/scality/Zenko/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scality/Zenko/downloads","issues_url":"https://api.github.com/repos/scality/Zenko/issues{/number}","pulls_url":"https://api.github.com/repos/scality/Zenko/pulls{/number}","milestones_url":"https://api.github.com/repos/scality/Zenko/milestones{/number}","notifications_url":"https://api.github.com/repos/scality/Zenko/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scality/Zenko/labels{/name}","releases_url":"https://api.github.com/repos/scality/Zenko/releases{/id}","deployments_url":"https://api.github.com/repos/scality/Zenko/deployments","created_at":"2017-06-07T00:53:14Z","updated_at":"2018-07-30T23:26:01Z","pushed_at":"2018-07-31T18:42:31Z","git_url":"git://github.com/scality/Zenko.git","ssh_url":"git@github.com:scality/Zenko.git","clone_url":"https://github.com/scality/Zenko.git","svn_url":"https://github.com/scality/Zenko","homepage":"https://www.zenko.io","size":1327,"stargazers_count":148,"watchers_count":148,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":38,"open_issues":27,"watchers":148,"default_branch":"development/0.9"}},"_links":{"self":{"href":"https://api.github.com/repos/scality/Zenko/pulls/239"},"html":{"href":"https://github.com/scality/Zenko/pull/239"},"issue":{"href":"https://api.github.com/repos/scality/Zenko/issues/239"},"comments":{"href":"https://api.github.com/repos/scality/Zenko/issues/239/comments"},"review_comments":{"href":"https://api.github.com/repos/scality/Zenko/pulls/239/comments"},"review_comment":{"href":"https://api.github.com/repos/scality/Zenko/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scality/Zenko/pulls/239/commits"},"statuses":{"href":"https://api.github.com/repos/scality/Zenko/statuses/9667f801b785e57bd5e5c7e5d52ea796a07917e4"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"bennettbuchanan"}}