{"action":"created","comment":{"url":"https://api.github.com/repos/openfaas/faas/pulls/comments/199583932","pull_request_review_id":133732160,"id":199583932,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTU4MzkzMg==","diff_hunk":"@@ -0,0 +1,56 @@\n+package handlers\n+\n+import (\n+\t\"encoding/json\"\n+\t\"log\"\n+\t\"net/http\"\n+\n+\t\"github.com/openfaas/faas/gateway/types\"\n+\t\"github.com/openfaas/faas/gateway/version\"\n+)\n+\n+// MakeInfoHandler is responsible for display component version information\n+func MakeInfoHandler(h http.Handler) http.HandlerFunc {\n+\treturn func(w http.ResponseWriter, r *http.Request) {\n+\t\tsw := types.NewStringResponseWriter()","path":"gateway/handlers/infohandler.go","position":15,"original_position":15,"commit_id":"32411682d71740f4ffe36359888ef0ff26e0836c","original_commit_id":"32411682d71740f4ffe36359888ef0ff26e0836c","user":{"login":"alexellis","id":6358735,"node_id":"MDQ6VXNlcjYzNTg3MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/6358735?v=4","gravatar_id":"","url":"https://api.github.com/users/alexellis","html_url":"https://github.com/alexellis","followers_url":"https://api.github.com/users/alexellis/followers","following_url":"https://api.github.com/users/alexellis/following{/other_user}","gists_url":"https://api.github.com/users/alexellis/gists{/gist_id}","starred_url":"https://api.github.com/users/alexellis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexellis/subscriptions","organizations_url":"https://api.github.com/users/alexellis/orgs","repos_url":"https://api.github.com/users/alexellis/repos","events_url":"https://api.github.com/users/alexellis/events{/privacy}","received_events_url":"https://api.github.com/users/alexellis/received_events","type":"User","site_admin":false},"body":"This looks interesting. I've used a http recorder elsewhere for this task such `add_metrics.go`","created_at":"2018-07-02T18:29:44Z","updated_at":"2018-07-02T18:29:44Z","html_url":"https://github.com/openfaas/faas/pull/737#discussion_r199583932","pull_request_url":"https://api.github.com/repos/openfaas/faas/pulls/737","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openfaas/faas/pulls/comments/199583932"},"html":{"href":"https://github.com/openfaas/faas/pull/737#discussion_r199583932"},"pull_request":{"href":"https://api.github.com/repos/openfaas/faas/pulls/737"}}},"pull_request":{"url":"https://api.github.com/repos/openfaas/faas/pulls/737","id":197798188,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3Nzk4MTg4","html_url":"https://github.com/openfaas/faas/pull/737","diff_url":"https://github.com/openfaas/faas/pull/737.diff","patch_url":"https://github.com/openfaas/faas/pull/737.patch","issue_url":"https://api.github.com/repos/openfaas/faas/issues/737","number":737,"state":"open","locked":false,"title":"[WIP] Enhance info endpoint to include gateway version","user":{"login":"ewilde","id":329397,"node_id":"MDQ6VXNlcjMyOTM5Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/329397?v=4","gravatar_id":"","url":"https://api.github.com/users/ewilde","html_url":"https://github.com/ewilde","followers_url":"https://api.github.com/users/ewilde/followers","following_url":"https://api.github.com/users/ewilde/following{/other_user}","gists_url":"https://api.github.com/users/ewilde/gists{/gist_id}","starred_url":"https://api.github.com/users/ewilde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewilde/subscriptions","organizations_url":"https://api.github.com/users/ewilde/orgs","repos_url":"https://api.github.com/users/ewilde/repos","events_url":"https://api.github.com/users/ewilde/events{/privacy}","received_events_url":"https://api.github.com/users/ewilde/received_events","type":"User","site_admin":false},"body":"## Description\r\nExtend the health endpoint and add gateway version information\r\n\r\n## Motivation and Context\r\nTo help debugging and operating the gateway i've included the gateway\r\nversion information in `/system/info`\r\n- [x] Resolves #733 \r\n\r\n\r\n## How Has This Been Tested?\r\nThis has been tested locally using the docker-compose file in root\r\nRequest: `curl http://localhost:8080/system/info -s | jq`\r\nResponse:\r\n```json\r\n{\r\n  \"provider\": {\r\n    \"provider\": \"faas-swarm\",\r\n    \"version\": {\r\n      \"sha\": \"c890cba302d059de8edbef3f3de7fe15444b1ecf\",\r\n      \"release\": \"0.3.3\"\r\n    },\r\n    \"orchestration\": \"swarm\"\r\n  },\r\n  \"version\": {\r\n    \"commit_message\": \"extends info endpoint\",\r\n    \"sha\": \"e85888b6122af1f084cf565462572220cc09cf28\",\r\n    \"release\": \"dev\"\r\n  }\r\n}\r\n```\r\nI've also ran the integration tests:\r\n```bash\r\n=== RUN   TestCreate_ValidRequest\r\n--- PASS: TestCreate_ValidRequest (0.04s)\r\n=== RUN   TestCreate_InvalidImage\r\n--- PASS: TestCreate_InvalidImage (0.01s)\r\n=== RUN   TestCreate_InvalidNetwork\r\n--- PASS: TestCreate_InvalidNetwork (0.01s)\r\n=== RUN   TestCreate_InvalidJson\r\n--- PASS: TestCreate_InvalidJson (0.00s)\r\n=== RUN   TestDelete_EmptyFunctionGivenFails\r\n--- PASS: TestDelete_EmptyFunctionGivenFails (0.00s)\r\n=== RUN   TestDelete_NonExistingFunctionGives404\r\n--- PASS: TestDelete_NonExistingFunctionGives404 (0.01s)\r\n=== RUN   Test_InfoEndpoint_Returns_200\r\n--- PASS: Test_InfoEndpoint_Returns_200 (0.00s)\r\n=== RUN   Test_InfoEndpoint_Returns_Gateway_Version_SHA_And_Message\r\n--- PASS: Test_InfoEndpoint_Returns_Gateway_Version_SHA_And_Message (0.00s)\r\n=== RUN   TestGet_Rejected\r\n--- PASS: TestGet_Rejected (0.01s)\r\n=== RUN   TestEchoIt_Post_Route_Handler_ForwardsClientHeaders\r\n--- PASS: TestEchoIt_Post_Route_Handler_ForwardsClientHeaders (0.00s)\r\n=== RUN   TestEchoIt_Post_Route_Handler\r\n--- PASS: TestEchoIt_Post_Route_Handler (0.01s)\r\nPASS\r\nok  \tgithub.com/openfaas/faas/gateway/tests/integration\t0.106s\r\n\r\nProcess finished with exit code 0\r\n```\r\n\r\n## Types of changes\r\n- [x] Breaking change to this endpoint, discussed in the associated issue\r\n\r\n## Checklist:\r\n- [x] My code follows the code style of this project.\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n- [x] I've read the [CONTRIBUTION](https://github.com/openfaas/faas/blob/master/CONTRIBUTING.md) guide\r\n- [x] I have signed-off my commits with `git commit -s`\r\n- [x] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed.\r\n","created_at":"2018-06-27T17:13:11Z","updated_at":"2018-07-02T18:29:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a27eaeaf947723a8291c827ac61f61aa9cbeebfd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openfaas/faas/pulls/737/commits","review_comments_url":"https://api.github.com/repos/openfaas/faas/pulls/737/comments","review_comment_url":"https://api.github.com/repos/openfaas/faas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openfaas/faas/issues/737/comments","statuses_url":"https://api.github.com/repos/openfaas/faas/statuses/32411682d71740f4ffe36359888ef0ff26e0836c","head":{"label":"ewilde:ewilde-info","ref":"ewilde-info","sha":"32411682d71740f4ffe36359888ef0ff26e0836c","user":{"login":"ewilde","id":329397,"node_id":"MDQ6VXNlcjMyOTM5Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/329397?v=4","gravatar_id":"","url":"https://api.github.com/users/ewilde","html_url":"https://github.com/ewilde","followers_url":"https://api.github.com/users/ewilde/followers","following_url":"https://api.github.com/users/ewilde/following{/other_user}","gists_url":"https://api.github.com/users/ewilde/gists{/gist_id}","starred_url":"https://api.github.com/users/ewilde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewilde/subscriptions","organizations_url":"https://api.github.com/users/ewilde/orgs","repos_url":"https://api.github.com/users/ewilde/repos","events_url":"https://api.github.com/users/ewilde/events{/privacy}","received_events_url":"https://api.github.com/users/ewilde/received_events","type":"User","site_admin":false},"repo":{"id":115712052,"node_id":"MDEwOlJlcG9zaXRvcnkxMTU3MTIwNTI=","name":"faas","full_name":"ewilde/faas","owner":{"login":"ewilde","id":329397,"node_id":"MDQ6VXNlcjMyOTM5Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/329397?v=4","gravatar_id":"","url":"https://api.github.com/users/ewilde","html_url":"https://github.com/ewilde","followers_url":"https://api.github.com/users/ewilde/followers","following_url":"https://api.github.com/users/ewilde/following{/other_user}","gists_url":"https://api.github.com/users/ewilde/gists{/gist_id}","starred_url":"https://api.github.com/users/ewilde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewilde/subscriptions","organizations_url":"https://api.github.com/users/ewilde/orgs","repos_url":"https://api.github.com/users/ewilde/repos","events_url":"https://api.github.com/users/ewilde/events{/privacy}","received_events_url":"https://api.github.com/users/ewilde/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ewilde/faas","description":"OpenFaaS - Serverless Functions Made Simple for Docker & Kubernetes","fork":true,"url":"https://api.github.com/repos/ewilde/faas","forks_url":"https://api.github.com/repos/ewilde/faas/forks","keys_url":"https://api.github.com/repos/ewilde/faas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ewilde/faas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ewilde/faas/teams","hooks_url":"https://api.github.com/repos/ewilde/faas/hooks","issue_events_url":"https://api.github.com/repos/ewilde/faas/issues/events{/number}","events_url":"https://api.github.com/repos/ewilde/faas/events","assignees_url":"https://api.github.com/repos/ewilde/faas/assignees{/user}","branches_url":"https://api.github.com/repos/ewilde/faas/branches{/branch}","tags_url":"https://api.github.com/repos/ewilde/faas/tags","blobs_url":"https://api.github.com/repos/ewilde/faas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ewilde/faas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ewilde/faas/git/refs{/sha}","trees_url":"https://api.github.com/repos/ewilde/faas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ewilde/faas/statuses/{sha}","languages_url":"https://api.github.com/repos/ewilde/faas/languages","stargazers_url":"https://api.github.com/repos/ewilde/faas/stargazers","contributors_url":"https://api.github.com/repos/ewilde/faas/contributors","subscribers_url":"https://api.github.com/repos/ewilde/faas/subscribers","subscription_url":"https://api.github.com/repos/ewilde/faas/subscription","commits_url":"https://api.github.com/repos/ewilde/faas/commits{/sha}","git_commits_url":"https://api.github.com/repos/ewilde/faas/git/commits{/sha}","comments_url":"https://api.github.com/repos/ewilde/faas/comments{/number}","issue_comment_url":"https://api.github.com/repos/ewilde/faas/issues/comments{/number}","contents_url":"https://api.github.com/repos/ewilde/faas/contents/{+path}","compare_url":"https://api.github.com/repos/ewilde/faas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ewilde/faas/merges","archive_url":"https://api.github.com/repos/ewilde/faas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ewilde/faas/downloads","issues_url":"https://api.github.com/repos/ewilde/faas/issues{/number}","pulls_url":"https://api.github.com/repos/ewilde/faas/pulls{/number}","milestones_url":"https://api.github.com/repos/ewilde/faas/milestones{/number}","notifications_url":"https://api.github.com/repos/ewilde/faas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ewilde/faas/labels{/name}","releases_url":"https://api.github.com/repos/ewilde/faas/releases{/id}","deployments_url":"https://api.github.com/repos/ewilde/faas/deployments","created_at":"2017-12-29T10:14:05Z","updated_at":"2018-06-24T11:35:42Z","pushed_at":"2018-07-02T15:42:23Z","git_url":"git://github.com/ewilde/faas.git","ssh_url":"git@github.com:ewilde/faas.git","clone_url":"https://github.com/ewilde/faas.git","svn_url":"https://github.com/ewilde/faas","homepage":"https://blog.alexellis.io/introducing-functions-as-a-service/","size":22151,"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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openfaas:master","ref":"master","sha":"49cc6ae7277c2c16090035ec454a90f242d258b6","user":{"login":"openfaas","id":27013154,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3MDEzMTU0","avatar_url":"https://avatars3.githubusercontent.com/u/27013154?v=4","gravatar_id":"","url":"https://api.github.com/users/openfaas","html_url":"https://github.com/openfaas","followers_url":"https://api.github.com/users/openfaas/followers","following_url":"https://api.github.com/users/openfaas/following{/other_user}","gists_url":"https://api.github.com/users/openfaas/gists{/gist_id}","starred_url":"https://api.github.com/users/openfaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfaas/subscriptions","organizations_url":"https://api.github.com/users/openfaas/orgs","repos_url":"https://api.github.com/users/openfaas/repos","events_url":"https://api.github.com/users/openfaas/events{/privacy}","received_events_url":"https://api.github.com/users/openfaas/received_events","type":"Organization","site_admin":false},"repo":{"id":77144337,"node_id":"MDEwOlJlcG9zaXRvcnk3NzE0NDMzNw==","name":"faas","full_name":"openfaas/faas","owner":{"login":"openfaas","id":27013154,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3MDEzMTU0","avatar_url":"https://avatars3.githubusercontent.com/u/27013154?v=4","gravatar_id":"","url":"https://api.github.com/users/openfaas","html_url":"https://github.com/openfaas","followers_url":"https://api.github.com/users/openfaas/followers","following_url":"https://api.github.com/users/openfaas/following{/other_user}","gists_url":"https://api.github.com/users/openfaas/gists{/gist_id}","starred_url":"https://api.github.com/users/openfaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfaas/subscriptions","organizations_url":"https://api.github.com/users/openfaas/orgs","repos_url":"https://api.github.com/users/openfaas/repos","events_url":"https://api.github.com/users/openfaas/events{/privacy}","received_events_url":"https://api.github.com/users/openfaas/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfaas/faas","description":"OpenFaaS - Serverless Functions Made Simple for Docker & Kubernetes","fork":false,"url":"https://api.github.com/repos/openfaas/faas","forks_url":"https://api.github.com/repos/openfaas/faas/forks","keys_url":"https://api.github.com/repos/openfaas/faas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfaas/faas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfaas/faas/teams","hooks_url":"https://api.github.com/repos/openfaas/faas/hooks","issue_events_url":"https://api.github.com/repos/openfaas/faas/issues/events{/number}","events_url":"https://api.github.com/repos/openfaas/faas/events","assignees_url":"https://api.github.com/repos/openfaas/faas/assignees{/user}","branches_url":"https://api.github.com/repos/openfaas/faas/branches{/branch}","tags_url":"https://api.github.com/repos/openfaas/faas/tags","blobs_url":"https://api.github.com/repos/openfaas/faas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfaas/faas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfaas/faas/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfaas/faas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfaas/faas/statuses/{sha}","languages_url":"https://api.github.com/repos/openfaas/faas/languages","stargazers_url":"https://api.github.com/repos/openfaas/faas/stargazers","contributors_url":"https://api.github.com/repos/openfaas/faas/contributors","subscribers_url":"https://api.github.com/repos/openfaas/faas/subscribers","subscription_url":"https://api.github.com/repos/openfaas/faas/subscription","commits_url":"https://api.github.com/repos/openfaas/faas/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfaas/faas/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfaas/faas/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfaas/faas/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfaas/faas/contents/{+path}","compare_url":"https://api.github.com/repos/openfaas/faas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfaas/faas/merges","archive_url":"https://api.github.com/repos/openfaas/faas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfaas/faas/downloads","issues_url":"https://api.github.com/repos/openfaas/faas/issues{/number}","pulls_url":"https://api.github.com/repos/openfaas/faas/pulls{/number}","milestones_url":"https://api.github.com/repos/openfaas/faas/milestones{/number}","notifications_url":"https://api.github.com/repos/openfaas/faas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfaas/faas/labels{/name}","releases_url":"https://api.github.com/repos/openfaas/faas/releases{/id}","deployments_url":"https://api.github.com/repos/openfaas/faas/deployments","created_at":"2016-12-22T12:51:39Z","updated_at":"2018-07-02T18:23:05Z","pushed_at":"2018-07-02T18:23:02Z","git_url":"git://github.com/openfaas/faas.git","ssh_url":"git@github.com:openfaas/faas.git","clone_url":"https://github.com/openfaas/faas.git","svn_url":"https://github.com/openfaas/faas","homepage":"https://docs.openfaas.com/","size":22224,"stargazers_count":10625,"watchers_count":10625,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":766,"mirror_url":null,"archived":false,"open_issues_count":96,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":766,"open_issues":96,"watchers":10625,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfaas/faas/pulls/737"},"html":{"href":"https://github.com/openfaas/faas/pull/737"},"issue":{"href":"https://api.github.com/repos/openfaas/faas/issues/737"},"comments":{"href":"https://api.github.com/repos/openfaas/faas/issues/737/comments"},"review_comments":{"href":"https://api.github.com/repos/openfaas/faas/pulls/737/comments"},"review_comment":{"href":"https://api.github.com/repos/openfaas/faas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openfaas/faas/pulls/737/commits"},"statuses":{"href":"https://api.github.com/repos/openfaas/faas/statuses/32411682d71740f4ffe36359888ef0ff26e0836c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alexellis"}}