{"action":"created","comment":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/comments/226098263","pull_request_review_id":165838998,"id":226098263,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjA5ODI2Mw==","diff_hunk":"@@ -0,0 +1,127 @@\n+// Copyright 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\"). You may\n+// not use this file except in compliance with the License. A copy of the\n+// License is located at\n+//\n+//\thttp://aws.amazon.com/apache2.0/\n+//\n+// or in the \"license\" file accompanying this file. This file is distributed\n+// on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n+// express or implied. See the License for the specific language governing\n+// permissions and limitations under the License.\n+\n+package utils\n+\n+import   (\n+\t\"fmt\"\n+\t\"strconv\"\n+\t\"strings\"\n+)\n+\n+type DockerVersion string\n+\n+type dockerapi_version struct {\n+\tmajor             int\n+\tminor             int\n+}\n+\n+// DockerVersionMatches returns whether or not a version matches a given selector.","path":"agent/utils/dockerapi_compare_versions.go","position":29,"original_position":29,"commit_id":"a8143efedf9f404b784c90a994d3bed6124b3bd5","original_commit_id":"a8143efedf9f404b784c90a994d3bed6124b3bd5","user":{"login":"fenxiong","id":36967769,"node_id":"MDQ6VXNlcjM2OTY3NzY5","avatar_url":"https://avatars0.githubusercontent.com/u/36967769?v=4","gravatar_id":"","url":"https://api.github.com/users/fenxiong","html_url":"https://github.com/fenxiong","followers_url":"https://api.github.com/users/fenxiong/followers","following_url":"https://api.github.com/users/fenxiong/following{/other_user}","gists_url":"https://api.github.com/users/fenxiong/gists{/gist_id}","starred_url":"https://api.github.com/users/fenxiong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fenxiong/subscriptions","organizations_url":"https://api.github.com/users/fenxiong/orgs","repos_url":"https://api.github.com/users/fenxiong/repos","events_url":"https://api.github.com/users/fenxiong/events{/privacy}","received_events_url":"https://api.github.com/users/fenxiong/received_events","type":"User","site_admin":false},"body":"DockerVersionMatches -> Matches","created_at":"2018-10-17T21:17:57Z","updated_at":"2018-10-17T21:21:29Z","html_url":"https://github.com/aws/amazon-ecs-agent/pull/1625#discussion_r226098263","pull_request_url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/1625","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/comments/226098263"},"html":{"href":"https://github.com/aws/amazon-ecs-agent/pull/1625#discussion_r226098263"},"pull_request":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/1625"}}},"pull_request":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/1625","id":223438589,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzNDM4NTg5","html_url":"https://github.com/aws/amazon-ecs-agent/pull/1625","diff_url":"https://github.com/aws/amazon-ecs-agent/pull/1625.diff","patch_url":"https://github.com/aws/amazon-ecs-agent/pull/1625.patch","issue_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/1625","number":1625,"state":"open","locked":false,"title":"Adding comaparator for Docker API versions","user":{"login":"ubhattacharjya","id":43968377,"node_id":"MDQ6VXNlcjQzOTY4Mzc3","avatar_url":"https://avatars2.githubusercontent.com/u/43968377?v=4","gravatar_id":"","url":"https://api.github.com/users/ubhattacharjya","html_url":"https://github.com/ubhattacharjya","followers_url":"https://api.github.com/users/ubhattacharjya/followers","following_url":"https://api.github.com/users/ubhattacharjya/following{/other_user}","gists_url":"https://api.github.com/users/ubhattacharjya/gists{/gist_id}","starred_url":"https://api.github.com/users/ubhattacharjya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubhattacharjya/subscriptions","organizations_url":"https://api.github.com/users/ubhattacharjya/orgs","repos_url":"https://api.github.com/users/ubhattacharjya/repos","events_url":"https://api.github.com/users/ubhattacharjya/events{/privacy}","received_events_url":"https://api.github.com/users/ubhattacharjya/received_events","type":"User","site_admin":false},"body":"<!--\r\nPlease make sure you've read and understood our contributing guidelines;\r\nhttps://github.com/aws/amazon-ecs-agent/blob/master/CONTRIBUTING.md\r\n\r\nPlease provide the following information:\r\n-->\r\n\r\n### Summary\r\n<!-- What does this pull request do? -->\r\n\r\nSince Docker API versions do not follow semantic versioning, a comparator is being added for the Docker APIs. Previously, whenever docker versions needed to be compared, it used to be appended with '.0' in order to use the same comparator used for comparing semantic versions.\r\n\r\nRef:  https://github.com/aws/amazon-ecs-agent/issues/1137\r\n\r\n### Implementation details\r\n<!-- How are the changes implemented? -->\r\nHere, a comparator has been added for comparing docker API versions. A couple of TODO comments are removed where docker versions were compared using the semantic version comparator. Now, in those places, docker versions are being compared with the newly added docker api version comparator.\r\n\r\n### Testing\r\n<!-- How was this tested? -->\r\n<!--\r\nNote for external contributors:\r\n`make test` and `make run-integ-tests` can run in a Linux development\r\nenvironment like your laptop.  `go test -timeout=25s ./agent/...` and\r\n`.\\scripts\\run-integ.tests.ps1` can run in a Windows development environment\r\nlike your laptop.  Please ensure unit and integration tests pass (on at least\r\none platform) before opening the pull request.  `make run-functional-tests` and\r\n`.\\scripts\\run-functional-tests.ps1` must be run on an EC2 instance with an\r\ninstance profile allowing it access to AWS resources.  Running\r\n`make run-functional-tests` and `.\\scripts\\run-functional-tests.ps1` may incur\r\ncharges to your AWS account; if you're unable or unwilling to run these tests\r\nin your own account, we can run the tests and provide test results.\r\n-->\r\n- [ ] Builds on Linux (`make release`)\r\n- [ ] Builds on Windows (`go build -out amazon-ecs-agent.exe ./agent`)\r\n- [ ] Unit tests on Linux (`make test`) pass\r\n- [ ] Unit tests on Windows (`go test -timeout=25s ./agent/...`) pass\r\n- [ ] Integration tests on Linux (`make run-integ-tests`) pass\r\n- [ ] Integration tests on Windows (`.\\scripts\\run-integ-tests.ps1`) pass\r\n- [ ] Functional tests on Linux (`make run-functional-tests`) pass\r\n- [ ] Functional tests on Windows (`.\\scripts\\run-functional-tests.ps1`) pass\r\n\r\nNew tests cover the changes: <!-- yes|no -->\r\n\r\n### Description for the changelog\r\n<!--\r\nWrite a short (one line) summary that describes the changes in this\r\npull request for inclusion in the changelog.\r\nYou can see our changelog entry style here:\r\nhttps://github.com/aws/amazon-ecs-agent/commit/c9aefebc2b3007f09468f651f6308136bd7b384f\r\n-->\r\n\r\n### Licensing\r\n\r\nBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.\r\n","created_at":"2018-10-17T00:54:30Z","updated_at":"2018-10-17T21:21:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b45336a06eac44cc57f5d556d518a60fca364159","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1034649096,"node_id":"MDU6TGFiZWwxMDM0NjQ5MDk2","url":"https://api.github.com/repos/aws/amazon-ecs-agent/labels/bot/test","name":"bot/test","color":"41ccd8","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/1625/commits","review_comments_url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/1625/comments","review_comment_url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/1625/comments","statuses_url":"https://api.github.com/repos/aws/amazon-ecs-agent/statuses/a8143efedf9f404b784c90a994d3bed6124b3bd5","head":{"label":"ubhattacharjya:changes_utsa","ref":"changes_utsa","sha":"a8143efedf9f404b784c90a994d3bed6124b3bd5","user":{"login":"ubhattacharjya","id":43968377,"node_id":"MDQ6VXNlcjQzOTY4Mzc3","avatar_url":"https://avatars2.githubusercontent.com/u/43968377?v=4","gravatar_id":"","url":"https://api.github.com/users/ubhattacharjya","html_url":"https://github.com/ubhattacharjya","followers_url":"https://api.github.com/users/ubhattacharjya/followers","following_url":"https://api.github.com/users/ubhattacharjya/following{/other_user}","gists_url":"https://api.github.com/users/ubhattacharjya/gists{/gist_id}","starred_url":"https://api.github.com/users/ubhattacharjya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubhattacharjya/subscriptions","organizations_url":"https://api.github.com/users/ubhattacharjya/orgs","repos_url":"https://api.github.com/users/ubhattacharjya/repos","events_url":"https://api.github.com/users/ubhattacharjya/events{/privacy}","received_events_url":"https://api.github.com/users/ubhattacharjya/received_events","type":"User","site_admin":false},"repo":{"id":152290133,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIyOTAxMzM=","name":"amazon-ecs-agent","full_name":"ubhattacharjya/amazon-ecs-agent","private":false,"owner":{"login":"ubhattacharjya","id":43968377,"node_id":"MDQ6VXNlcjQzOTY4Mzc3","avatar_url":"https://avatars2.githubusercontent.com/u/43968377?v=4","gravatar_id":"","url":"https://api.github.com/users/ubhattacharjya","html_url":"https://github.com/ubhattacharjya","followers_url":"https://api.github.com/users/ubhattacharjya/followers","following_url":"https://api.github.com/users/ubhattacharjya/following{/other_user}","gists_url":"https://api.github.com/users/ubhattacharjya/gists{/gist_id}","starred_url":"https://api.github.com/users/ubhattacharjya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubhattacharjya/subscriptions","organizations_url":"https://api.github.com/users/ubhattacharjya/orgs","repos_url":"https://api.github.com/users/ubhattacharjya/repos","events_url":"https://api.github.com/users/ubhattacharjya/events{/privacy}","received_events_url":"https://api.github.com/users/ubhattacharjya/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ubhattacharjya/amazon-ecs-agent","description":"Amazon Elastic Container Service Agent","fork":true,"url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent","forks_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/forks","keys_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/teams","hooks_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/hooks","issue_events_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/issues/events{/number}","events_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/events","assignees_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/assignees{/user}","branches_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/branches{/branch}","tags_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/tags","blobs_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/languages","stargazers_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/stargazers","contributors_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/contributors","subscribers_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/subscribers","subscription_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/subscription","commits_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/contents/{+path}","compare_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/merges","archive_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/downloads","issues_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/issues{/number}","pulls_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/labels{/name}","releases_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/releases{/id}","deployments_url":"https://api.github.com/repos/ubhattacharjya/amazon-ecs-agent/deployments","created_at":"2018-10-09T17:08:28Z","updated_at":"2018-10-15T20:55:54Z","pushed_at":"2018-10-17T20:45:27Z","git_url":"git://github.com/ubhattacharjya/amazon-ecs-agent.git","ssh_url":"git@github.com:ubhattacharjya/amazon-ecs-agent.git","clone_url":"https://github.com/ubhattacharjya/amazon-ecs-agent.git","svn_url":"https://github.com/ubhattacharjya/amazon-ecs-agent","homepage":"http://aws.amazon.com/ecs/","size":31573,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aws:dev","ref":"dev","sha":"679b3b852043ea9c883076ef285de26fea485553","user":{"login":"aws","id":2232217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzIyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"repo":{"id":27551774,"node_id":"MDEwOlJlcG9zaXRvcnkyNzU1MTc3NA==","name":"amazon-ecs-agent","full_name":"aws/amazon-ecs-agent","private":false,"owner":{"login":"aws","id":2232217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzIyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/aws/amazon-ecs-agent","description":"Amazon Elastic Container Service Agent","fork":false,"url":"https://api.github.com/repos/aws/amazon-ecs-agent","forks_url":"https://api.github.com/repos/aws/amazon-ecs-agent/forks","keys_url":"https://api.github.com/repos/aws/amazon-ecs-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aws/amazon-ecs-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aws/amazon-ecs-agent/teams","hooks_url":"https://api.github.com/repos/aws/amazon-ecs-agent/hooks","issue_events_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/events{/number}","events_url":"https://api.github.com/repos/aws/amazon-ecs-agent/events","assignees_url":"https://api.github.com/repos/aws/amazon-ecs-agent/assignees{/user}","branches_url":"https://api.github.com/repos/aws/amazon-ecs-agent/branches{/branch}","tags_url":"https://api.github.com/repos/aws/amazon-ecs-agent/tags","blobs_url":"https://api.github.com/repos/aws/amazon-ecs-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aws/amazon-ecs-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aws/amazon-ecs-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/aws/amazon-ecs-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aws/amazon-ecs-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/aws/amazon-ecs-agent/languages","stargazers_url":"https://api.github.com/repos/aws/amazon-ecs-agent/stargazers","contributors_url":"https://api.github.com/repos/aws/amazon-ecs-agent/contributors","subscribers_url":"https://api.github.com/repos/aws/amazon-ecs-agent/subscribers","subscription_url":"https://api.github.com/repos/aws/amazon-ecs-agent/subscription","commits_url":"https://api.github.com/repos/aws/amazon-ecs-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/aws/amazon-ecs-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/aws/amazon-ecs-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/aws/amazon-ecs-agent/contents/{+path}","compare_url":"https://api.github.com/repos/aws/amazon-ecs-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aws/amazon-ecs-agent/merges","archive_url":"https://api.github.com/repos/aws/amazon-ecs-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aws/amazon-ecs-agent/downloads","issues_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues{/number}","pulls_url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/aws/amazon-ecs-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/aws/amazon-ecs-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aws/amazon-ecs-agent/labels{/name}","releases_url":"https://api.github.com/repos/aws/amazon-ecs-agent/releases{/id}","deployments_url":"https://api.github.com/repos/aws/amazon-ecs-agent/deployments","created_at":"2014-12-04T17:31:49Z","updated_at":"2018-10-17T11:57:37Z","pushed_at":"2018-10-17T20:45:29Z","git_url":"git://github.com/aws/amazon-ecs-agent.git","ssh_url":"git@github.com:aws/amazon-ecs-agent.git","clone_url":"https://github.com/aws/amazon-ecs-agent.git","svn_url":"https://github.com/aws/amazon-ecs-agent","homepage":"http://aws.amazon.com/ecs/","size":31720,"stargazers_count":1349,"watchers_count":1349,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":363,"mirror_url":null,"archived":false,"open_issues_count":117,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":363,"open_issues":117,"watchers":1349,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/1625"},"html":{"href":"https://github.com/aws/amazon-ecs-agent/pull/1625"},"issue":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/1625"},"comments":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/1625/comments"},"review_comments":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/1625/comments"},"review_comment":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/1625/commits"},"statuses":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/statuses/a8143efedf9f404b784c90a994d3bed6124b3bd5"}},"author_association":"NONE"}}
{"actor":{"display_login":"fenxiong"}}