{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/vic/pulls/comments/168004235","pull_request_review_id":96303669,"id":168004235,"diff_hunk":"@@ -0,0 +1,100 @@\n+// Copyright 2018 VMware, Inc. All Rights Reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//    http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+package progresslog\n+\n+import (\n+\t\"sync\"\n+\t\"time\"\n+\n+\t\"github.com/vmware/govmomi/vim25/progress\"\n+\t\"github.com/vmware/govmomi/vim25/soap\"\n+)\n+\n+// UploadParams uses default upload settings as initial input and set UploadLogger as a logger.\n+func UploadParams(ul *UploadLogger) *soap.Upload {\n+\tparams := soap.DefaultUpload\n+\tparams.Progress = ul\n+\treturn &params\n+}\n+\n+// UploadLogger io used to track upload progress to ESXi/VC of a specific file.\n+type UploadLogger struct {\n+\twg       sync.WaitGroup\n+\tfilename string\n+\tinterval time.Duration\n+\tlogTo    func(format string, args ...interface{})\n+}\n+\n+// NewUploadLogger returns a new instance of UploadLogger. User can provide a logger interface\n+// that will be used to dump output of the current upload status.\n+func NewUploadLogger(logTo func(format string, args ...interface{}),\n+\tfilename string, progressInterval time.Duration) *UploadLogger {\n+\n+\treturn &UploadLogger{\n+\t\tlogTo:    logTo,\n+\t\tfilename: filename,\n+\t\tinterval: progressInterval,\n+\t}\n+}\n+\n+// Sink returns a channel that receives current upload progress status.\n+// Channel has to be closed by the caller.\n+func (ul *UploadLogger) Sink() chan<- progress.Report {","path":"lib/progresslog/progresslog.go","position":54,"original_position":54,"commit_id":"f66a6f950af9ebfcc880750569678c915c8cac92","original_commit_id":"f66a6f950af9ebfcc880750569678c915c8cac92","user":{"login":"matthewavery","id":8620942,"avatar_url":"https://avatars2.githubusercontent.com/u/8620942?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewavery","html_url":"https://github.com/matthewavery","followers_url":"https://api.github.com/users/matthewavery/followers","following_url":"https://api.github.com/users/matthewavery/following{/other_user}","gists_url":"https://api.github.com/users/matthewavery/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewavery/subscriptions","organizations_url":"https://api.github.com/users/matthewavery/orgs","repos_url":"https://api.github.com/users/matthewavery/repos","events_url":"https://api.github.com/users/matthewavery/events{/privacy}","received_events_url":"https://api.github.com/users/matthewavery/received_events","type":"User","site_admin":false},"body":"Never mind, I missed the `range ticket.C` :)","created_at":"2018-02-13T21:19:15Z","updated_at":"2018-02-13T21:19:15Z","html_url":"https://github.com/vmware/vic/pull/7320#discussion_r168004235","pull_request_url":"https://api.github.com/repos/vmware/vic/pulls/7320","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments/168004235"},"html":{"href":"https://github.com/vmware/vic/pull/7320#discussion_r168004235"},"pull_request":{"href":"https://api.github.com/repos/vmware/vic/pulls/7320"}},"in_reply_to_id":168003855},"pull_request":{"url":"https://api.github.com/repos/vmware/vic/pulls/7320","id":168944202,"html_url":"https://github.com/vmware/vic/pull/7320","diff_url":"https://github.com/vmware/vic/pull/7320.diff","patch_url":"https://github.com/vmware/vic/pull/7320.patch","issue_url":"https://api.github.com/repos/vmware/vic/issues/7320","number":7320,"state":"open","locked":false,"title":"Added upload progress bar tracker for ISO images.","user":{"login":"vburenin","id":4350891,"avatar_url":"https://avatars2.githubusercontent.com/u/4350891?v=4","gravatar_id":"","url":"https://api.github.com/users/vburenin","html_url":"https://github.com/vburenin","followers_url":"https://api.github.com/users/vburenin/followers","following_url":"https://api.github.com/users/vburenin/following{/other_user}","gists_url":"https://api.github.com/users/vburenin/gists{/gist_id}","starred_url":"https://api.github.com/users/vburenin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vburenin/subscriptions","organizations_url":"https://api.github.com/users/vburenin/orgs","repos_url":"https://api.github.com/users/vburenin/repos","events_url":"https://api.github.com/users/vburenin/events{/privacy}","received_events_url":"https://api.github.com/users/vburenin/received_events","type":"User","site_admin":false},"body":"Removed concurrent upload since it doesn't make any significant performance imapact.\r\nWhen I tried to measure performance differene with and without concurrent uppload,\r\nthe results were fluctuating in a wide range so not good measurement was possible.\r\n\r\nFixes #7317\r\n\r\n```\r\nDEBU[0000] properties: [config.files.vmPathName summary.runtime.connectionState] \r\nDEBU[0000] vm folder name: \"vic-docker\"                 \r\nDEBU[0000] vm inventory path: \"/ha-datacenter/vm/vic-docker\" \r\nDEBU[0001] properties: [config.files.vmPathName summary.runtime.connectionState] \r\nDEBU[0001] generating new config secret key             \r\nINFO[0001] Uploading images for container               \r\nDEBU[0001] Checking if file already exists: vic-docker/V1.4.0-DEV-0-C089C72-appliance.iso \r\nDEBU[0001] File not found. Nothing to do.               \r\nINFO[0001] Uploading appliance.iso as V1.4.0-DEV-0-C089C72-appliance.iso \r\nINFO[0001] Uploading appliance.iso. Progress: 0.00%     \r\nINFO[0004] Uploading appliance.iso. Progress: 29.06%    \r\nINFO[0007] Uploading appliance.iso. Progress: 57.08%    \r\nINFO[0010] Uploading appliance.iso. Progress: 85.83%    \r\nINFO[0013] Uploading appliance.iso. Progress: 98.92%    \r\nINFO[0014] Uploading appliance.iso. Progress: 100.00%   \r\nINFO[0014] Uploading of appliance.iso has been complete \r\nDEBU[0014] Checking if file already exists: vic-docker/V1.4.0-DEV-0-C089C72-bootstrap.iso \r\nDEBU[0014] File not found. Nothing to do.               \r\nINFO[0014] Uploading bootstrap.iso as V1.4.0-DEV-0-C089C72-bootstrap.iso \r\nINFO[0014] Uploading bootstrap.iso. Progress: 0.00%     \r\nINFO[0017] Uploading bootstrap.iso. Progress: 64.29%    \r\nINFO[0018] Uploading bootstrap.iso. Progress: 100.00%   \r\nINFO[0018] Uploading of bootstrap.iso has been complete \r\nINFO[0019] Waiting for IP information                   \r\nINFO[0031] Waiting for major appliance components to launch \r\n```","created_at":"2018-02-13T20:11:50Z","updated_at":"2018-02-13T21:19:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4bca0f537909d3e81343ca0036f42bd0fea7a3d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"zjs","id":408880,"avatar_url":"https://avatars2.githubusercontent.com/u/408880?v=4","gravatar_id":"","url":"https://api.github.com/users/zjs","html_url":"https://github.com/zjs","followers_url":"https://api.github.com/users/zjs/followers","following_url":"https://api.github.com/users/zjs/following{/other_user}","gists_url":"https://api.github.com/users/zjs/gists{/gist_id}","starred_url":"https://api.github.com/users/zjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zjs/subscriptions","organizations_url":"https://api.github.com/users/zjs/orgs","repos_url":"https://api.github.com/users/zjs/repos","events_url":"https://api.github.com/users/zjs/events{/privacy}","received_events_url":"https://api.github.com/users/zjs/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":353174341,"url":"https://api.github.com/repos/vmware/vic/labels/cla-not-required","name":"cla-not-required","color":"ffffff","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/vic/pulls/7320/commits","review_comments_url":"https://api.github.com/repos/vmware/vic/pulls/7320/comments","review_comment_url":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/vic/issues/7320/comments","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/f66a6f950af9ebfcc880750569678c915c8cac92","head":{"label":"vburenin:upload-progress","ref":"upload-progress","sha":"f66a6f950af9ebfcc880750569678c915c8cac92","user":{"login":"vburenin","id":4350891,"avatar_url":"https://avatars2.githubusercontent.com/u/4350891?v=4","gravatar_id":"","url":"https://api.github.com/users/vburenin","html_url":"https://github.com/vburenin","followers_url":"https://api.github.com/users/vburenin/followers","following_url":"https://api.github.com/users/vburenin/following{/other_user}","gists_url":"https://api.github.com/users/vburenin/gists{/gist_id}","starred_url":"https://api.github.com/users/vburenin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vburenin/subscriptions","organizations_url":"https://api.github.com/users/vburenin/orgs","repos_url":"https://api.github.com/users/vburenin/repos","events_url":"https://api.github.com/users/vburenin/events{/privacy}","received_events_url":"https://api.github.com/users/vburenin/received_events","type":"User","site_admin":false},"repo":{"id":70089932,"name":"vic","full_name":"vburenin/vic","owner":{"login":"vburenin","id":4350891,"avatar_url":"https://avatars2.githubusercontent.com/u/4350891?v=4","gravatar_id":"","url":"https://api.github.com/users/vburenin","html_url":"https://github.com/vburenin","followers_url":"https://api.github.com/users/vburenin/followers","following_url":"https://api.github.com/users/vburenin/following{/other_user}","gists_url":"https://api.github.com/users/vburenin/gists{/gist_id}","starred_url":"https://api.github.com/users/vburenin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vburenin/subscriptions","organizations_url":"https://api.github.com/users/vburenin/orgs","repos_url":"https://api.github.com/users/vburenin/repos","events_url":"https://api.github.com/users/vburenin/events{/privacy}","received_events_url":"https://api.github.com/users/vburenin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vburenin/vic","description":"Integrated containers engine on vSphere","fork":true,"url":"https://api.github.com/repos/vburenin/vic","forks_url":"https://api.github.com/repos/vburenin/vic/forks","keys_url":"https://api.github.com/repos/vburenin/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vburenin/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vburenin/vic/teams","hooks_url":"https://api.github.com/repos/vburenin/vic/hooks","issue_events_url":"https://api.github.com/repos/vburenin/vic/issues/events{/number}","events_url":"https://api.github.com/repos/vburenin/vic/events","assignees_url":"https://api.github.com/repos/vburenin/vic/assignees{/user}","branches_url":"https://api.github.com/repos/vburenin/vic/branches{/branch}","tags_url":"https://api.github.com/repos/vburenin/vic/tags","blobs_url":"https://api.github.com/repos/vburenin/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vburenin/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vburenin/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/vburenin/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vburenin/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/vburenin/vic/languages","stargazers_url":"https://api.github.com/repos/vburenin/vic/stargazers","contributors_url":"https://api.github.com/repos/vburenin/vic/contributors","subscribers_url":"https://api.github.com/repos/vburenin/vic/subscribers","subscription_url":"https://api.github.com/repos/vburenin/vic/subscription","commits_url":"https://api.github.com/repos/vburenin/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/vburenin/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/vburenin/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/vburenin/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/vburenin/vic/contents/{+path}","compare_url":"https://api.github.com/repos/vburenin/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vburenin/vic/merges","archive_url":"https://api.github.com/repos/vburenin/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vburenin/vic/downloads","issues_url":"https://api.github.com/repos/vburenin/vic/issues{/number}","pulls_url":"https://api.github.com/repos/vburenin/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/vburenin/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/vburenin/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vburenin/vic/labels{/name}","releases_url":"https://api.github.com/repos/vburenin/vic/releases{/id}","deployments_url":"https://api.github.com/repos/vburenin/vic/deployments","created_at":"2016-10-05T18:59:46Z","updated_at":"2016-10-05T18:59:49Z","pushed_at":"2018-02-13T20:18:38Z","git_url":"git://github.com/vburenin/vic.git","ssh_url":"git@github.com:vburenin/vic.git","clone_url":"https://github.com/vburenin/vic.git","svn_url":"https://github.com/vburenin/vic","homepage":"","size":65280,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vmware:master","ref":"master","sha":"c089c7214eaf875d29498b7889f57ecdd575f52c","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars0.githubusercontent.com/u/473334?v=4","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":49597898,"name":"vic","full_name":"vmware/vic","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars0.githubusercontent.com/u/473334?v=4","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/vic","description":"Integrated containers engine on vSphere","fork":false,"url":"https://api.github.com/repos/vmware/vic","forks_url":"https://api.github.com/repos/vmware/vic/forks","keys_url":"https://api.github.com/repos/vmware/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/vic/teams","hooks_url":"https://api.github.com/repos/vmware/vic/hooks","issue_events_url":"https://api.github.com/repos/vmware/vic/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/vic/events","assignees_url":"https://api.github.com/repos/vmware/vic/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/vic/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/vic/tags","blobs_url":"https://api.github.com/repos/vmware/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/vic/languages","stargazers_url":"https://api.github.com/repos/vmware/vic/stargazers","contributors_url":"https://api.github.com/repos/vmware/vic/contributors","subscribers_url":"https://api.github.com/repos/vmware/vic/subscribers","subscription_url":"https://api.github.com/repos/vmware/vic/subscription","commits_url":"https://api.github.com/repos/vmware/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/vic/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/vic/merges","archive_url":"https://api.github.com/repos/vmware/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/vic/downloads","issues_url":"https://api.github.com/repos/vmware/vic/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/vic/labels{/name}","releases_url":"https://api.github.com/repos/vmware/vic/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/vic/deployments","created_at":"2016-01-13T19:53:57Z","updated_at":"2018-02-13T17:15:13Z","pushed_at":"2018-02-13T20:50:04Z","git_url":"git://github.com/vmware/vic.git","ssh_url":"git@github.com:vmware/vic.git","clone_url":"https://github.com/vmware/vic.git","svn_url":"https://github.com/vmware/vic","homepage":"http://vmware.github.io/vic","size":69682,"stargazers_count":303,"watchers_count":303,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":122,"mirror_url":null,"archived":false,"open_issues_count":1036,"license":null,"forks":122,"open_issues":1036,"watchers":303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/7320"},"html":{"href":"https://github.com/vmware/vic/pull/7320"},"issue":{"href":"https://api.github.com/repos/vmware/vic/issues/7320"},"comments":{"href":"https://api.github.com/repos/vmware/vic/issues/7320/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/vic/pulls/7320/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/vic/pulls/7320/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/vic/statuses/f66a6f950af9ebfcc880750569678c915c8cac92"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"matthewavery"}}