Skip to content

Commit

Permalink
Merge pull request #194 from Real-Dev-Squad/develop
Browse files Browse the repository at this point in the history
Dev to main
  • Loading branch information
lakshayman authored Feb 7, 2024
2 parents 0e77651 + cfdfd71 commit fa18838
Show file tree
Hide file tree
Showing 25 changed files with 469 additions and 3,789 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: aws-actions/setup-sam@v1

- name: Build resources
run: sam build --template ${SAM_TEMPLATE} --use-container --build-image public.ecr.aws/sam/build-go1.x:1.107.0-20240110194920 --debug
run: sam build --template ${SAM_TEMPLATE} --use-container --build-image public.ecr.aws/sam/build-go1.x:1.108.0-20240123215155 --debug

- name: Assume the pipeline user role
env:
Expand Down
2 changes: 1 addition & 1 deletion call-profile/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module main

go 1.18
go 1.21

require (
cloud.google.com/go/firestore v1.10.0
Expand Down
1 change: 1 addition & 0 deletions call-profile/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw=
github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc=
github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
Expand Down
5 changes: 4 additions & 1 deletion call-profile/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,10 @@ func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyRespo
userUrl = userUrl + "/"
}
var isServiceRunning bool
_, serviceErr := http.Get(userUrl + "health")
c := &http.Client{
Timeout: 5 * time.Second,
}
_, serviceErr := c.Get(userUrl + "health")
if serviceErr != nil {
isServiceRunning = false
} else {
Expand Down
2 changes: 1 addition & 1 deletion call-profiles/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module callProfiles

go 1.18
go 1.21

require (
cloud.google.com/go/firestore v1.10.0
Expand Down
1 change: 1 addition & 0 deletions call-profiles/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw=
github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc=
github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
Expand Down
2 changes: 1 addition & 1 deletion call-profiles/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func callProfile(userId string, sessionId string) {
jsonBody := []byte(fmt.Sprintf(`{"userId": "%s", "sessionId": "%s"}`, userId, sessionId))
bodyReader := bytes.NewReader(jsonBody)

requestURL := fmt.Sprintf("%s/call-profile", os.Getenv("baseURL"))
requestURL := fmt.Sprintf("%s/profile", os.Getenv("baseURL"))
req, _ := http.NewRequest(http.MethodPost, requestURL, bodyReader)
_, err1 := httpClient.Do(req)
if err1 != nil {
Expand Down
52 changes: 46 additions & 6 deletions health-check/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,49 @@
module healthCheck

go 1.21

require (
github.com/aws/aws-lambda-go v1.28.0
github.com/stretchr/testify v1.6.1
gopkg.in/yaml.v3 v3.0.1 // indirect
cloud.google.com/go/firestore v1.14.0
firebase.google.com/go v3.13.0+incompatible
github.com/aws/aws-lambda-go v1.46.0
github.com/aws/aws-sdk-go v1.50.11
google.golang.org/api v0.162.0
)

module health

go 1.16
require (
cloud.google.com/go v0.111.0 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.5 // indirect
cloud.google.com/go/longrunning v0.5.4 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/grpc v1.61.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
)
Loading

0 comments on commit fa18838

Please sign in to comment.