From 9f93fc14c3c84996a18f88e5eeb2a64864a774ab Mon Sep 17 00:00:00 2001 From: penghaoh Date: Wed, 23 Nov 2022 12:12:22 -0800 Subject: [PATCH 1/7] chore: add sc e2e test --- e2e/exec/exec_test.go | 1 + e2e/internal/client/outputs.go | 7 +++-- e2e/multi-svc-app/back-end/main.go | 10 +++---- .../copilot/front-end/manifest.yml | 3 ++ e2e/multi-svc-app/front-end/main.go | 17 +++++------ e2e/multi-svc-app/multi_svc_app_suite_test.go | 2 +- e2e/multi-svc-app/multi_svc_app_test.go | 29 ++++++++++--------- 7 files changed, 37 insertions(+), 32 deletions(-) diff --git a/e2e/exec/exec_test.go b/e2e/exec/exec_test.go index 4e441a19dce..dd5a47b28fa 100644 --- a/e2e/exec/exec_test.go +++ b/e2e/exec/exec_test.go @@ -157,6 +157,7 @@ var _ = Describe("exec flow", func() { }) Expect(err).NotTo(HaveOccurred()) Expect(len(svc.Routes)).To(Equal(1)) + Expect(len(svc.ServiceConnects)).To(Equal(0)) route := svc.Routes[0] Expect(route.Environment).To(Equal(envName)) diff --git a/e2e/internal/client/outputs.go b/e2e/internal/client/outputs.go index bc89f6aa92e..7701b2186d7 100644 --- a/e2e/internal/client/outputs.go +++ b/e2e/internal/client/outputs.go @@ -65,7 +65,8 @@ type SvcShowOutput struct { Type string `json:"type"` AppName string `json:"application"` Configs []SvcShowConfigurations `json:"configurations"` - ServiceDiscoveries []SvcShowServiceDiscoveries `json:"serviceDiscovery"` + ServiceDiscoveries []SvcShowServiceEndpoints `json:"serviceDiscovery"` + ServiceConnects []SvcShowServiceEndpoints `json:"serviceConnect"` Routes []SvcShowRoutes `json:"routes"` Variables []SvcShowVariables `json:"variables"` Resources map[string][]*SvcShowResourceInfo `json:"resources"` @@ -86,8 +87,8 @@ type SvcShowRoutes struct { URL string `json:"url"` } -// SvcShowServiceDiscoveries contains serialized service discovery info for an service. -type SvcShowServiceDiscoveries struct { +// SvcShowServiceEndpoints contains serialized endpoint info for an service. +type SvcShowServiceEndpoints struct { Environment []string `json:"environment"` Endpoint string `json:"endpoint"` } diff --git a/e2e/multi-svc-app/back-end/main.go b/e2e/multi-svc-app/back-end/main.go index 95ca94caa81..25397a68ffa 100644 --- a/e2e/multi-svc-app/back-end/main.go +++ b/e2e/multi-svc-app/back-end/main.go @@ -23,17 +23,17 @@ func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { w.Write([]byte("back-end")) } -// ServiceDiscoveryGet just returns true no matter what -func ServiceDiscoveryGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { - log.Println("Get on ServiceDiscovery endpoint Succeeded") +// ServiceConnectGet just returns true no matter what +func ServiceConnectGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { + log.Println("Get on service connect endpoint Succeeded") w.WriteHeader(http.StatusOK) - w.Write([]byte("back-end-service-discovery")) + w.Write([]byte("back-end-service-connect")) } func main() { router := httprouter.New() router.GET("/back-end/", SimpleGet) - router.GET("/service-discovery/", ServiceDiscoveryGet) + router.GET("/service-connect/", ServiceConnectGet) // Health Check router.GET("/", HealthCheck) diff --git a/e2e/multi-svc-app/copilot/front-end/manifest.yml b/e2e/multi-svc-app/copilot/front-end/manifest.yml index 59e225f337d..baf1e1d4547 100644 --- a/e2e/multi-svc-app/copilot/front-end/manifest.yml +++ b/e2e/multi-svc-app/copilot/front-end/manifest.yml @@ -22,6 +22,9 @@ http: # To match all requests you can use the "/" path. path: '/' +network: + connect: true + # Number of CPU units for the task. cpu: 256 # Amount of memory in MiB used by the task. diff --git a/e2e/multi-svc-app/front-end/main.go b/e2e/multi-svc-app/front-end/main.go index 09a34e4574d..d67f4834ad7 100644 --- a/e2e/multi-svc-app/front-end/main.go +++ b/e2e/multi-svc-app/front-end/main.go @@ -30,20 +30,19 @@ func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { w.Write([]byte("front-end")) } -// ServiceDiscoveryGet calls the back-end service, via service-discovery. +// ServiceConnectGet calls the back-end service, via service-connect. // This call should succeed and return the value from the backend service. -// This test assumes the backend app is called "back-end". The 'service-discovery' endpoint +// This test assumes the backend app is called "back-end". The 'service-connect' endpoint // of the back-end service is unreachable from the LB, so the only way to get it is -// through service discovery. The response should be `back-end-service-discovery` -func ServiceDiscoveryGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { - endpoint := fmt.Sprintf("http://back-end.%s/service-discovery/", os.Getenv("COPILOT_SERVICE_DISCOVERY_ENDPOINT")) - resp, err := http.Get(endpoint) +// through service connect. The response should be `back-end-service-connect` +func ServiceConnectGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { + resp, err := http.Get("http://back-end/service-connect/") if err != nil { - log.Printf("🚨 could call service discovery endpoint: err=%s\n", err) + log.Printf("🚨 could call service connect endpoint: err=%s\n", err) http.Error(w, err.Error(), http.StatusInternalServerError) return } - log.Println("Get on ServiceDiscovery endpoint Succeeded") + log.Println("Get on service connect endpoint Succeeded") defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) w.WriteHeader(http.StatusOK) @@ -123,7 +122,7 @@ func PutEFSCheck(w http.ResponseWriter, req *http.Request, ps httprouter.Params) func main() { router := httprouter.New() router.GET("/", SimpleGet) - router.GET("/service-discovery-test", ServiceDiscoveryGet) + router.GET("/service-connect-test", ServiceConnectGet) router.GET("/magicwords/", GetMagicWords) router.GET("/job-checker/", GetJobCheck) router.GET("/job-setter/", SetJobCheck) diff --git a/e2e/multi-svc-app/multi_svc_app_suite_test.go b/e2e/multi-svc-app/multi_svc_app_suite_test.go index 7db1b3199f5..c0be22da1de 100644 --- a/e2e/multi-svc-app/multi_svc_app_suite_test.go +++ b/e2e/multi-svc-app/multi_svc_app_suite_test.go @@ -17,7 +17,7 @@ var cli *client.CLI var aws *client.AWS var appName string -/** +/* The multi svc suite runs through several tests focusing on creating multiple services in one app. */ diff --git a/e2e/multi-svc-app/multi_svc_app_test.go b/e2e/multi-svc-app/multi_svc_app_test.go index ef47aee8411..bd268ad6486 100644 --- a/e2e/multi-svc-app/multi_svc_app_test.go +++ b/e2e/multi-svc-app/multi_svc_app_test.go @@ -199,6 +199,11 @@ var _ = Describe("Multiple Service App", func() { routeURL string ) BeforeAll(func() { + _, backEndDeployErr = cli.SvcDeploy(&client.SvcDeployInput{ + Name: "back-end", + EnvName: "test", + ImageTag: "gallopinggurdey", + }) _, frontEndDeployErr = cli.SvcDeploy(&client.SvcDeployInput{ Name: "front-end", EnvName: "test", @@ -214,11 +219,6 @@ var _ = Describe("Multiple Service App", func() { EnvName: "test", ImageTag: "gallopinggurdey", }) - _, backEndDeployErr = cli.SvcDeploy(&client.SvcDeployInput{ - Name: "back-end", - EnvName: "test", - ImageTag: "gallopinggurdey", - }) }) It("svc deploy should succeed", func() { @@ -301,15 +301,15 @@ var _ = Describe("Multiple Service App", func() { Expect(svcs["back-end"].Type).To(Equal("Backend Service")) }) - It("service discovery should be enabled and working", func() { + It("service connect should be enabled and working", func() { // The front-end service is set up to have a path called - // "/front-end/service-discovery-test" - this route + // "/front-end/service-connect-test" - this route // calls a function which makes a call via the service - // discovery endpoint, "back-end.local". If that back-end + // connect endpoint, "back-end.local". If that back-end // call succeeds, the back-end returns a response - // "back-end-service-discovery". This should be forwarded + // "back-end-service-connect". This should be forwarded // back to us via the front-end api. - // [test] -- http req -> [front-end] -- service-discovery -> [back-end] + // [test] -- http req -> [front-end] -- service-connect -> [back-end] svcName := "front-end" svc, svcShowErr := cli.SvcShow(&client.SvcShowRequest{ AppName: appName, @@ -317,15 +317,17 @@ var _ = Describe("Multiple Service App", func() { }) Expect(svcShowErr).NotTo(HaveOccurred()) Expect(len(svc.Routes)).To(Equal(1)) + Expect(len(svc.ServiceConnects)).To(Equal(1)) + Expect(svc.ServiceConnects[0].Endpoint).To(Equal(fmt.Sprintf("%s:80", svcName))) - // Calls the front end's service discovery endpoint - which should connect + // Calls the front end's service connect endpoint - which should connect // to the backend, and pipe the backend response to us. route := svc.Routes[0] Expect(route.Environment).To(Equal("test")) routeURL = route.URL - resp, fetchErr := http.Get(fmt.Sprintf("%s/service-discovery-test/", route.URL)) + resp, fetchErr := http.Get(fmt.Sprintf("%s/service-connect-test/", route.URL)) Expect(fetchErr).NotTo(HaveOccurred()) Expect(resp.StatusCode).To(Equal(200)) @@ -333,8 +335,7 @@ var _ = Describe("Multiple Service App", func() { // name as the value. bodyBytes, err := ioutil.ReadAll(resp.Body) Expect(err).NotTo(HaveOccurred()) - Expect(string(bodyBytes)).To(Equal("back-end-service-discovery")) - + Expect(string(bodyBytes)).To(Equal("back-end-service-connect")) }) It("should be able to write to EFS volume", func() { From 3b0284e214d9e52b26c8ba4de56b69504a63e70f Mon Sep 17 00:00:00 2001 From: penghaoh Date: Wed, 23 Nov 2022 12:31:35 -0800 Subject: [PATCH 2/7] Keep sd --- e2e/multi-svc-app/back-end/main.go | 10 +++++----- e2e/multi-svc-app/front-end/main.go | 22 +++++++++++++++------- e2e/multi-svc-app/multi_svc_app_test.go | 14 ++++++-------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/e2e/multi-svc-app/back-end/main.go b/e2e/multi-svc-app/back-end/main.go index 25397a68ffa..cc3005a143f 100644 --- a/e2e/multi-svc-app/back-end/main.go +++ b/e2e/multi-svc-app/back-end/main.go @@ -23,17 +23,17 @@ func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { w.Write([]byte("back-end")) } -// ServiceConnectGet just returns true no matter what -func ServiceConnectGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { - log.Println("Get on service connect endpoint Succeeded") +// Get just returns true no matter what +func Get(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { + log.Println("Get on service endpoint Succeeded") w.WriteHeader(http.StatusOK) - w.Write([]byte("back-end-service-connect")) + w.Write([]byte("back-end-service")) } func main() { router := httprouter.New() router.GET("/back-end/", SimpleGet) - router.GET("/service-connect/", ServiceConnectGet) + router.GET("/service-endpoint/", Get) // Health Check router.GET("/", HealthCheck) diff --git a/e2e/multi-svc-app/front-end/main.go b/e2e/multi-svc-app/front-end/main.go index d67f4834ad7..1dcec5cf1ee 100644 --- a/e2e/multi-svc-app/front-end/main.go +++ b/e2e/multi-svc-app/front-end/main.go @@ -30,18 +30,26 @@ func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { w.Write([]byte("front-end")) } -// ServiceConnectGet calls the back-end service, via service-connect. +// ServiceGet calls the back-end service, via service-connect and service-discovery. // This call should succeed and return the value from the backend service. -// This test assumes the backend app is called "back-end". The 'service-connect' endpoint -// of the back-end service is unreachable from the LB, so the only way to get it is -// through service connect. The response should be `back-end-service-connect` -func ServiceConnectGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { - resp, err := http.Get("http://back-end/service-connect/") +// This test assumes the backend app is called "back-end". The 'service-connect' and +// 'service-discovery' endpoint of the back-end service is unreachable from the LB, +// so the only way to get it is through service connect and service discovery. +// The response should be `back-end-service` +func ServiceGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { + resp, err := http.Get("http://back-end/service-endpoint/") if err != nil { log.Printf("🚨 could call service connect endpoint: err=%s\n", err) http.Error(w, err.Error(), http.StatusInternalServerError) return } + sdEndpoint := fmt.Sprintf("http://back-end.%s/service-discovery/", os.Getenv("COPILOT_SERVICE_DISCOVERY_ENDPOINT")) + resp, err = http.Get(sdEndpoint) + if err != nil { + log.Printf("🚨 could call service discovery endpoint: err=%s\n", err) + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } log.Println("Get on service connect endpoint Succeeded") defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) @@ -122,7 +130,7 @@ func PutEFSCheck(w http.ResponseWriter, req *http.Request, ps httprouter.Params) func main() { router := httprouter.New() router.GET("/", SimpleGet) - router.GET("/service-connect-test", ServiceConnectGet) + router.GET("/service-endpoint-test", ServiceGet) router.GET("/magicwords/", GetMagicWords) router.GET("/job-checker/", GetJobCheck) router.GET("/job-setter/", SetJobCheck) diff --git a/e2e/multi-svc-app/multi_svc_app_test.go b/e2e/multi-svc-app/multi_svc_app_test.go index bd268ad6486..51eeba38d84 100644 --- a/e2e/multi-svc-app/multi_svc_app_test.go +++ b/e2e/multi-svc-app/multi_svc_app_test.go @@ -301,13 +301,13 @@ var _ = Describe("Multiple Service App", func() { Expect(svcs["back-end"].Type).To(Equal("Backend Service")) }) - It("service connect should be enabled and working", func() { + It("service internal endpoint should be enabled and working", func() { // The front-end service is set up to have a path called - // "/front-end/service-connect-test" - this route + // "/front-end/service-endpoint-test" - this route // calls a function which makes a call via the service - // connect endpoint, "back-end.local". If that back-end + // connect/discovery endpoint, "back-end.local". If that back-end // call succeeds, the back-end returns a response - // "back-end-service-connect". This should be forwarded + // "back-end-service". This should be forwarded // back to us via the front-end api. // [test] -- http req -> [front-end] -- service-connect -> [back-end] svcName := "front-end" @@ -320,14 +320,12 @@ var _ = Describe("Multiple Service App", func() { Expect(len(svc.ServiceConnects)).To(Equal(1)) Expect(svc.ServiceConnects[0].Endpoint).To(Equal(fmt.Sprintf("%s:80", svcName))) - // Calls the front end's service connect endpoint - which should connect - // to the backend, and pipe the backend response to us. route := svc.Routes[0] Expect(route.Environment).To(Equal("test")) routeURL = route.URL - resp, fetchErr := http.Get(fmt.Sprintf("%s/service-connect-test/", route.URL)) + resp, fetchErr := http.Get(fmt.Sprintf("%s/service-endpoint-test/", route.URL)) Expect(fetchErr).NotTo(HaveOccurred()) Expect(resp.StatusCode).To(Equal(200)) @@ -335,7 +333,7 @@ var _ = Describe("Multiple Service App", func() { // name as the value. bodyBytes, err := ioutil.ReadAll(resp.Body) Expect(err).NotTo(HaveOccurred()) - Expect(string(bodyBytes)).To(Equal("back-end-service-connect")) + Expect(string(bodyBytes)).To(Equal("back-end-service")) }) It("should be able to write to EFS volume", func() { From 2213a2a790aa96ed81b89073fee28223b856f35f Mon Sep 17 00:00:00 2001 From: penghaoh Date: Wed, 23 Nov 2022 12:33:45 -0800 Subject: [PATCH 3/7] Nit --- e2e/multi-svc-app/front-end/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/multi-svc-app/front-end/main.go b/e2e/multi-svc-app/front-end/main.go index 1dcec5cf1ee..83ea0f4b4a2 100644 --- a/e2e/multi-svc-app/front-end/main.go +++ b/e2e/multi-svc-app/front-end/main.go @@ -43,6 +43,7 @@ func ServiceGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) http.Error(w, err.Error(), http.StatusInternalServerError) return } + log.Println("Get on service connect endpoint Succeeded") sdEndpoint := fmt.Sprintf("http://back-end.%s/service-discovery/", os.Getenv("COPILOT_SERVICE_DISCOVERY_ENDPOINT")) resp, err = http.Get(sdEndpoint) if err != nil { @@ -50,7 +51,7 @@ func ServiceGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) http.Error(w, err.Error(), http.StatusInternalServerError) return } - log.Println("Get on service connect endpoint Succeeded") + log.Println("Get on service discovery endpoint Succeeded") defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) w.WriteHeader(http.StatusOK) From 16998d909e0d9c06080056500d1f75c6aa6cb1ed Mon Sep 17 00:00:00 2001 From: penghaoh Date: Wed, 23 Nov 2022 12:39:19 -0800 Subject: [PATCH 4/7] Add back comment --- e2e/multi-svc-app/multi_svc_app_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/e2e/multi-svc-app/multi_svc_app_test.go b/e2e/multi-svc-app/multi_svc_app_test.go index 51eeba38d84..4954b436d6a 100644 --- a/e2e/multi-svc-app/multi_svc_app_test.go +++ b/e2e/multi-svc-app/multi_svc_app_test.go @@ -320,6 +320,8 @@ var _ = Describe("Multiple Service App", func() { Expect(len(svc.ServiceConnects)).To(Equal(1)) Expect(svc.ServiceConnects[0].Endpoint).To(Equal(fmt.Sprintf("%s:80", svcName))) + // Calls the front end's service connect/discovery endpoint - which should connect + // to the backend, and pipe the backend response to us. route := svc.Routes[0] Expect(route.Environment).To(Equal("test")) From 759ccbc3e3fdef8a7a3fe919c20a5d0c696a1e83 Mon Sep 17 00:00:00 2001 From: KollaAdithya <71282729+KollaAdithya@users.noreply.github.com> Date: Wed, 23 Nov 2022 12:56:37 -0800 Subject: [PATCH 5/7] docs: add flowlog retention and autoscaling for release v1.24 (#4205) Release v1.24 docs By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License. --- site/content/docs/manifest/environment.en.md | 19 +++++++++++++++++-- .../docs/manifest/rd-web-service.en.md | 8 ++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/site/content/docs/manifest/environment.en.md b/site/content/docs/manifest/environment.en.md index 2f7ec380a89..692fc7563b7 100644 --- a/site/content/docs/manifest/environment.en.md +++ b/site/content/docs/manifest/environment.en.md @@ -194,9 +194,24 @@ ports: 80 network.vpc.security_group..`cidr` String The IPv4 address range, in CIDR format. -network.vpc.`flow_logs` Boolean -Specify true to enable VPC flow logs to capture information about the IP traffic going in and out of the environment VPC. +network.vpc.`flow_logs` Boolean or Map +If you specify 'true', Copilot will enable VPC flow logs to capture information about the IP traffic going in and out of the environment VPC. +The default value for VPC flow logs is 14 days (2 weeks). +```yaml +network: + vpc: + flow_logs: on +``` +You can customize the number of days for retention: +```yaml +network: + vpc: + flow_logs: + retention: 30 +``` +network.vpc.flow_logs.`retention` String +The number of days to retain the log events. See [this page](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-retentionindays) for all accepted values.
diff --git a/site/content/docs/manifest/rd-web-service.en.md b/site/content/docs/manifest/rd-web-service.en.md index aa3e1d0b1ba..79ecd15310f 100644 --- a/site/content/docs/manifest/rd-web-service.en.md +++ b/site/content/docs/manifest/rd-web-service.en.md @@ -222,6 +222,14 @@ Key-value pairs representing AWS tags that are passed down to your AWS App Runne
+`count` String +Specify the name of an existing autoscaling configuration. +```yaml +count: high-availability/3 +``` + +
+ `environments` Map The environment section lets you override any value in your manifest based on the environment you're in. In the example manifest above, we're overriding the `LOG_LEVEL` environment variable in our 'test' environment. From 1df261305ab87b41317dec3f3d36361e96cd38a0 Mon Sep 17 00:00:00 2001 From: penghaoh Date: Wed, 23 Nov 2022 14:23:31 -0800 Subject: [PATCH 6/7] Fix paste error --- e2e/multi-svc-app/front-end/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/multi-svc-app/front-end/main.go b/e2e/multi-svc-app/front-end/main.go index 83ea0f4b4a2..8a5717bc6ff 100644 --- a/e2e/multi-svc-app/front-end/main.go +++ b/e2e/multi-svc-app/front-end/main.go @@ -44,7 +44,7 @@ func ServiceGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) return } log.Println("Get on service connect endpoint Succeeded") - sdEndpoint := fmt.Sprintf("http://back-end.%s/service-discovery/", os.Getenv("COPILOT_SERVICE_DISCOVERY_ENDPOINT")) + sdEndpoint := fmt.Sprintf("http://back-end.%s/service-endpoint/", os.Getenv("COPILOT_SERVICE_DISCOVERY_ENDPOINT")) resp, err = http.Get(sdEndpoint) if err != nil { log.Printf("🚨 could call service discovery endpoint: err=%s\n", err) From c38b60b6d1e511381526066d66cbcfc4d57f21a3 Mon Sep 17 00:00:00 2001 From: penghaoh Date: Wed, 23 Nov 2022 14:40:58 -0800 Subject: [PATCH 7/7] Addr nit --- e2e/apprunner/back-end/main.go | 2 +- e2e/apprunner/front-end/main.go | 2 +- e2e/internal/client/outputs.go | 2 +- e2e/multi-svc-app/back-end/main.go | 4 ++-- e2e/multi-svc-app/front-end/main.go | 2 +- e2e/multi-svc-app/www/main.go | 2 +- regression/multi-svc-app/back-end/main.go | 4 ++-- regression/multi-svc-app/back-end/swap/main.go | 4 ++-- regression/multi-svc-app/front-end/main.go | 2 +- regression/multi-svc-app/front-end/swap/main.go | 2 +- regression/multi-svc-app/www/main.go | 2 +- regression/multi-svc-app/www/swap/main.go | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/e2e/apprunner/back-end/main.go b/e2e/apprunner/back-end/main.go index 65571639e4e..9805d393a08 100644 --- a/e2e/apprunner/back-end/main.go +++ b/e2e/apprunner/back-end/main.go @@ -17,7 +17,7 @@ func HealthCheck(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusOK) } -// ServiceDiscoveryGet just returns true no matter what +// ServiceDiscoveryGet just returns true no matter what. func ServiceDiscoveryGet(w http.ResponseWriter, req *http.Request) { log.Printf("Get on ServiceDiscovery endpoint Succeeded with message %s\n", message) w.WriteHeader(http.StatusOK) diff --git a/e2e/apprunner/front-end/main.go b/e2e/apprunner/front-end/main.go index 5d86bb48858..648f13a2b5b 100644 --- a/e2e/apprunner/front-end/main.go +++ b/e2e/apprunner/front-end/main.go @@ -29,7 +29,7 @@ const ( postgresDriver = "postgres" ) -// SimpleGet just returns true no matter what +// SimpleGet just returns true no matter what. func SimpleGet(w http.ResponseWriter, req *http.Request) { log.Println("Get Succeeded") w.WriteHeader(http.StatusOK) diff --git a/e2e/internal/client/outputs.go b/e2e/internal/client/outputs.go index 7701b2186d7..d7019a0d7cb 100644 --- a/e2e/internal/client/outputs.go +++ b/e2e/internal/client/outputs.go @@ -87,7 +87,7 @@ type SvcShowRoutes struct { URL string `json:"url"` } -// SvcShowServiceEndpoints contains serialized endpoint info for an service. +// SvcShowServiceEndpoints contains serialized endpoint info for a service. type SvcShowServiceEndpoints struct { Environment []string `json:"environment"` Endpoint string `json:"endpoint"` diff --git a/e2e/multi-svc-app/back-end/main.go b/e2e/multi-svc-app/back-end/main.go index cc3005a143f..de0c5fb5936 100644 --- a/e2e/multi-svc-app/back-end/main.go +++ b/e2e/multi-svc-app/back-end/main.go @@ -16,14 +16,14 @@ func HealthCheck(w http.ResponseWriter, req *http.Request, ps httprouter.Params) w.WriteHeader(http.StatusOK) } -// SimpleGet just returns true no matter what +// SimpleGet just returns true no matter what. func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get Succeeded") w.WriteHeader(http.StatusOK) w.Write([]byte("back-end")) } -// Get just returns true no matter what +// Get just returns true no matter what. func Get(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get on service endpoint Succeeded") w.WriteHeader(http.StatusOK) diff --git a/e2e/multi-svc-app/front-end/main.go b/e2e/multi-svc-app/front-end/main.go index 8a5717bc6ff..ea70298dc3e 100644 --- a/e2e/multi-svc-app/front-end/main.go +++ b/e2e/multi-svc-app/front-end/main.go @@ -23,7 +23,7 @@ var ( volumeName = "efsTestVolume" ) -// SimpleGet just returns true no matter what +// SimpleGet just returns true no matter what. func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get Succeeded") w.WriteHeader(http.StatusOK) diff --git a/e2e/multi-svc-app/www/main.go b/e2e/multi-svc-app/www/main.go index cf90a599c90..63572211d7d 100644 --- a/e2e/multi-svc-app/www/main.go +++ b/e2e/multi-svc-app/www/main.go @@ -10,7 +10,7 @@ import ( "github.com/julienschmidt/httprouter" ) -// SimpleGet just returns true no matter what +// SimpleGet just returns true no matter what. func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get Succeeded") w.WriteHeader(http.StatusOK) diff --git a/regression/multi-svc-app/back-end/main.go b/regression/multi-svc-app/back-end/main.go index 95ca94caa81..ebd467bc4e6 100644 --- a/regression/multi-svc-app/back-end/main.go +++ b/regression/multi-svc-app/back-end/main.go @@ -16,14 +16,14 @@ func HealthCheck(w http.ResponseWriter, req *http.Request, ps httprouter.Params) w.WriteHeader(http.StatusOK) } -// SimpleGet just returns true no matter what +// SimpleGet just returns true no matter what. func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get Succeeded") w.WriteHeader(http.StatusOK) w.Write([]byte("back-end")) } -// ServiceDiscoveryGet just returns true no matter what +// ServiceDiscoveryGet just returns true no matter what. func ServiceDiscoveryGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get on ServiceDiscovery endpoint Succeeded") w.WriteHeader(http.StatusOK) diff --git a/regression/multi-svc-app/back-end/swap/main.go b/regression/multi-svc-app/back-end/swap/main.go index 3630891c110..ca7dd847993 100644 --- a/regression/multi-svc-app/back-end/swap/main.go +++ b/regression/multi-svc-app/back-end/swap/main.go @@ -16,14 +16,14 @@ func HealthCheck(w http.ResponseWriter, req *http.Request, ps httprouter.Params) w.WriteHeader(http.StatusOK) } -// SimpleGet just returns true no matter what +// SimpleGet just returns true no matter what. func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get Succeeded") w.WriteHeader(http.StatusOK) w.Write([]byte("back-end oraoraora")) // NOTE: response body appended with "oraoraora" } -// ServiceDiscoveryGet just returns true no matter what +// ServiceDiscoveryGet just returns true no matter what. func ServiceDiscoveryGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get on ServiceDiscovery endpoint Succeeded") w.WriteHeader(http.StatusOK) diff --git a/regression/multi-svc-app/front-end/main.go b/regression/multi-svc-app/front-end/main.go index ef83f9f3f53..6b28fc7708d 100644 --- a/regression/multi-svc-app/front-end/main.go +++ b/regression/multi-svc-app/front-end/main.go @@ -13,7 +13,7 @@ import ( "github.com/julienschmidt/httprouter" ) -// SimpleGet just returns true no matter what +// SimpleGet just returns true no matter what. func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get Succeeded") w.WriteHeader(http.StatusOK) diff --git a/regression/multi-svc-app/front-end/swap/main.go b/regression/multi-svc-app/front-end/swap/main.go index 1c3a3daa542..e9209405b48 100644 --- a/regression/multi-svc-app/front-end/swap/main.go +++ b/regression/multi-svc-app/front-end/swap/main.go @@ -13,7 +13,7 @@ import ( "github.com/julienschmidt/httprouter" ) -// SimpleGet just returns true no matter what +// SimpleGet just returns true no matter what. func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get Succeeded") w.WriteHeader(http.StatusOK) diff --git a/regression/multi-svc-app/www/main.go b/regression/multi-svc-app/www/main.go index cf90a599c90..63572211d7d 100644 --- a/regression/multi-svc-app/www/main.go +++ b/regression/multi-svc-app/www/main.go @@ -10,7 +10,7 @@ import ( "github.com/julienschmidt/httprouter" ) -// SimpleGet just returns true no matter what +// SimpleGet just returns true no matter what. func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get Succeeded") w.WriteHeader(http.StatusOK) diff --git a/regression/multi-svc-app/www/swap/main.go b/regression/multi-svc-app/www/swap/main.go index dd440fe85ae..dbd4fe3bc94 100644 --- a/regression/multi-svc-app/www/swap/main.go +++ b/regression/multi-svc-app/www/swap/main.go @@ -10,7 +10,7 @@ import ( "github.com/julienschmidt/httprouter" ) -// SimpleGet just returns true no matter what +// SimpleGet just returns true no matter what. func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { log.Println("Get Succeeded") w.WriteHeader(http.StatusOK)