{"action":"created","comment":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/comments/87502253","pull_request_review_id":8113914,"id":87502253,"diff_hunk":"@@ -0,0 +1,778 @@\n+// +build windows\n+// Copyright 2014-2015 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 util\n+\n+import (\n+\t\"crypto/md5\"\n+\t\"encoding/json\"\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"io/ioutil\"\n+\t\"net/http\"\n+\t\"os\"\n+\t\"path\"\n+\t\"path/filepath\"\n+\t\"regexp\"\n+\t\"runtime\"\n+\t\"strings\"\n+\t\"testing\"\n+\t\"time\"\n+\t\"os/exec\"\n+  \"golang.org/x/sys/windows/registry\"","path":"agent/functional_tests/util/utils_windows.go","position":null,"original_position":33,"commit_id":"2b97bf2b1f82a0aea914ed7f31458c85596dbd9f","original_commit_id":"85f66b33001ee86f5aaf54c4565bb55cfb6a6796","user":{"login":"aaithal","id":1183359,"avatar_url":"https://avatars.githubusercontent.com/u/1183359?v=3","gravatar_id":"","url":"https://api.github.com/users/aaithal","html_url":"https://github.com/aaithal","followers_url":"https://api.github.com/users/aaithal/followers","following_url":"https://api.github.com/users/aaithal/following{/other_user}","gists_url":"https://api.github.com/users/aaithal/gists{/gist_id}","starred_url":"https://api.github.com/users/aaithal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaithal/subscriptions","organizations_url":"https://api.github.com/users/aaithal/orgs","repos_url":"https://api.github.com/users/aaithal/repos","events_url":"https://api.github.com/users/aaithal/events{/privacy}","received_events_url":"https://api.github.com/users/aaithal/received_events","type":"User","site_admin":false},"body":"weird tabbing..","created_at":"2016-11-10T22:39:33Z","updated_at":"2016-11-10T22:41:56Z","html_url":"https://github.com/aws/amazon-ecs-agent/pull/579#discussion_r87502253","pull_request_url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/579","_links":{"self":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/comments/87502253"},"html":{"href":"https://github.com/aws/amazon-ecs-agent/pull/579#discussion_r87502253"},"pull_request":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/579"}}},"pull_request":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/579","id":91665632,"html_url":"https://github.com/aws/amazon-ecs-agent/pull/579","diff_url":"https://github.com/aws/amazon-ecs-agent/pull/579.diff","patch_url":"https://github.com/aws/amazon-ecs-agent/pull/579.patch","issue_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/579","number":579,"state":"open","locked":false,"title":"[WIP] Windows","user":{"login":"samuelkarp","id":737750,"avatar_url":"https://avatars.githubusercontent.com/u/737750?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelkarp","html_url":"https://github.com/samuelkarp","followers_url":"https://api.github.com/users/samuelkarp/followers","following_url":"https://api.github.com/users/samuelkarp/following{/other_user}","gists_url":"https://api.github.com/users/samuelkarp/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelkarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelkarp/subscriptions","organizations_url":"https://api.github.com/users/samuelkarp/orgs","repos_url":"https://api.github.com/users/samuelkarp/repos","events_url":"https://api.github.com/users/samuelkarp/events{/privacy}","received_events_url":"https://api.github.com/users/samuelkarp/received_events","type":"User","site_admin":false},"body":"@aaithal @richardpen @nmeyerhans @kiranmeduri \r\n\r\n**WORK IN PROGRESS, DO NOT MERGE**\r\n\r\n### Summary\r\n[![Build status](https://ci.appveyor.com/api/projects/status/k596sc8k5u7tneoc/branch/windows?svg=true)](https://ci.appveyor.com/project/samuelkarp/amazon-ecs-agent/branch/windows)\r\n\r\nThis pull request gets the ECS agent working on Windows.  This is a work in progress and there are a number of things that don't work or don't work very well.  I'll be continuing to work on this until it's ready to merge.\r\n\r\n### Implementation details\r\nMuch of the code works on Windows without issue.  However, a few things did need to change:\r\n* I needed to add support for Windows named pipes to [go-dockerclient](https://github.com/fsouza/go-dockerclient/pull/579) in order to communicate with the Docker daemon\r\n* I've migrated our state-saving mechanism that uses POSIX filesystem semantics for atomicity on Linux to use the Windows registry for atomicity\r\n* I've accounted for case-insensitivity for file paths on Windows (though there may still be bugs lurking here)\r\n* I've worked around a [bug in Docker](https://github.com/docker/docker/issues/27601) involving the output of `docker inspect`\r\n* Additional setup is necessary on the host in order to use IAM roles for tasks (not covered in this PR)\r\n\r\nAll commits marked \"WIP\" need to be revisited before this is ready to be merged.\r\n\r\n### Testing\r\nI've run a few simple task definitions for Windows involving multiple containers and volume mounts.  Unit tests are passing on Windows: [![Build status](https://ci.appveyor.com/api/projects/status/k596sc8k5u7tneoc/branch/windows?svg=true)](https://ci.appveyor.com/project/samuelkarp/amazon-ecs-agent/branch/windows)\r\n\r\n- [x] Builds (`make release` on Linux and `go build .\\agent` on Windows)\r\n- [x] Unit tests (`make test` on Linux and `go test -timeout=25s .\\agent\\...` on Windows) pass\r\n- [x] Integration tests (`make run-integ-tests` on Linux and `.\\scripts\\run-integ-tests.ps1` on Windows) pass\r\n- [ ] Functional tests (`make run-functional-tests`) pass\r\n\r\nNew tests cover the changes: yes\r\n\r\n### Description for the changelog\r\nFeature - Support for Docker on Windows Server 2016\r\n\r\n### Licensing\r\nThis contribution is under the terms of the Apache 2.0 License: yes (Amazon employee)\r\n","created_at":"2016-10-31T18:39:27Z","updated_at":"2016-11-10T22:41:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b08199bc3e5db46595a3b51e8a29ca621cf80b4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/579/commits","review_comments_url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/579/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/579/comments","statuses_url":"https://api.github.com/repos/aws/amazon-ecs-agent/statuses/2b97bf2b1f82a0aea914ed7f31458c85596dbd9f","head":{"label":"samuelkarp:windows","ref":"windows","sha":"2b97bf2b1f82a0aea914ed7f31458c85596dbd9f","user":{"login":"samuelkarp","id":737750,"avatar_url":"https://avatars.githubusercontent.com/u/737750?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelkarp","html_url":"https://github.com/samuelkarp","followers_url":"https://api.github.com/users/samuelkarp/followers","following_url":"https://api.github.com/users/samuelkarp/following{/other_user}","gists_url":"https://api.github.com/users/samuelkarp/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelkarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelkarp/subscriptions","organizations_url":"https://api.github.com/users/samuelkarp/orgs","repos_url":"https://api.github.com/users/samuelkarp/repos","events_url":"https://api.github.com/users/samuelkarp/events{/privacy}","received_events_url":"https://api.github.com/users/samuelkarp/received_events","type":"User","site_admin":false},"repo":{"id":31009542,"name":"amazon-ecs-agent","full_name":"samuelkarp/amazon-ecs-agent","owner":{"login":"samuelkarp","id":737750,"avatar_url":"https://avatars.githubusercontent.com/u/737750?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelkarp","html_url":"https://github.com/samuelkarp","followers_url":"https://api.github.com/users/samuelkarp/followers","following_url":"https://api.github.com/users/samuelkarp/following{/other_user}","gists_url":"https://api.github.com/users/samuelkarp/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelkarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelkarp/subscriptions","organizations_url":"https://api.github.com/users/samuelkarp/orgs","repos_url":"https://api.github.com/users/samuelkarp/repos","events_url":"https://api.github.com/users/samuelkarp/events{/privacy}","received_events_url":"https://api.github.com/users/samuelkarp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samuelkarp/amazon-ecs-agent","description":"Amazon EC2 Container Service Agent","fork":true,"url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent","forks_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/forks","keys_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/teams","hooks_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/hooks","issue_events_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/issues/events{/number}","events_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/events","assignees_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/assignees{/user}","branches_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/branches{/branch}","tags_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/tags","blobs_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/languages","stargazers_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/stargazers","contributors_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/contributors","subscribers_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/subscribers","subscription_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/subscription","commits_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/contents/{+path}","compare_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/merges","archive_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/downloads","issues_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/issues{/number}","pulls_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/labels{/name}","releases_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/releases{/id}","deployments_url":"https://api.github.com/repos/samuelkarp/amazon-ecs-agent/deployments","created_at":"2015-02-19T10:01:24Z","updated_at":"2016-03-30T17:59:16Z","pushed_at":"2016-11-10T22:11:29Z","git_url":"git://github.com/samuelkarp/amazon-ecs-agent.git","ssh_url":"git@github.com:samuelkarp/amazon-ecs-agent.git","clone_url":"https://github.com/samuelkarp/amazon-ecs-agent.git","svn_url":"https://github.com/samuelkarp/amazon-ecs-agent","homepage":"http://aws.amazon.com/ecs/","size":4534,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"aws:dev","ref":"dev","sha":"2cc8963bc093d52a6835c52bfe4655771cd5fc07","user":{"login":"aws","id":2232217,"avatar_url":"https://avatars.githubusercontent.com/u/2232217?v=3","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,"name":"amazon-ecs-agent","full_name":"aws/amazon-ecs-agent","owner":{"login":"aws","id":2232217,"avatar_url":"https://avatars.githubusercontent.com/u/2232217?v=3","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},"private":false,"html_url":"https://github.com/aws/amazon-ecs-agent","description":"Amazon EC2 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":"2016-11-09T23:47:10Z","pushed_at":"2016-11-10T22:33:35Z","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":7799,"stargazers_count":696,"watchers_count":696,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":187,"mirror_url":null,"open_issues_count":93,"forks":187,"open_issues":93,"watchers":696,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/579"},"html":{"href":"https://github.com/aws/amazon-ecs-agent/pull/579"},"issue":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/579"},"comments":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/579/comments"},"review_comments":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/579/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/579/commits"},"statuses":{"href":"https://api.github.com/repos/aws/amazon-ecs-agent/statuses/2b97bf2b1f82a0aea914ed7f31458c85596dbd9f"}}}}
{"actor":{"display_login":"aaithal"}}