From 6cd620e1bcb5ef8e98a245fc96607640b8a15053 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 22:08:12 +0000 Subject: [PATCH 1/4] Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4.1.7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v2...v4.1.7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- .github/workflows/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index ad93a44..b795f64 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -76,7 +76,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v2 - uses: aws-actions/setup-sam@v1 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4.1.7 with: name: packaged.yaml From b5422e772753a4a32be22819b8a0e7585676b1b0 Mon Sep 17 00:00:00 2001 From: Lakshay Manchanda Date: Mon, 16 Sep 2024 01:25:27 +0530 Subject: [PATCH 2/4] Profile diff storing in wrong collection resolved --- layer/utils/firestore.go | 2 +- layer/utils/logging.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/layer/utils/firestore.go b/layer/utils/firestore.go index 00d31f5..3a2e60a 100644 --- a/layer/utils/firestore.go +++ b/layer/utils/firestore.go @@ -60,7 +60,7 @@ func getLastDiff(client *firestore.Client, ctx context.Context, userId string, a func generateAndStoreDiff(client *firestore.Client, ctx context.Context, res Res, userId string, sessionId string) error { newDiff := resToDiff(res, userId) - _, err := client.Collection("users").Doc(userId).Collection("diffs").Doc("diff_"+userId).Set(ctx, newDiff) + _, _, err := client.Collection("profileDiffs").Add(ctx, diffToMap(newDiff)) if err != nil { return err } diff --git a/layer/utils/logging.go b/layer/utils/logging.go index 2251d74..3790519 100644 --- a/layer/utils/logging.go +++ b/layer/utils/logging.go @@ -18,6 +18,7 @@ func logProfileStored(client *firestore.Client, ctx context.Context, diff Diff, "sessionId": sessionId, }, Body: map[string]interface{}{ + "userId": userId, "profile": diffToMap(diff), }, } @@ -51,6 +52,7 @@ func LogHealth(client *firestore.Client, ctx context.Context, userId string, isS "sessionId": sessionId, }, Body: map[string]interface{}{ + "userId": userId, "serviceRunning": isServiceRunning, }, } From a7a9cffd52c65cd52de55a7c86ebf7246fe12bd0 Mon Sep 17 00:00:00 2001 From: Lakshay Manchanda Date: Mon, 16 Sep 2024 01:39:56 +0530 Subject: [PATCH 3/4] Changed the artifact version from 2 to 3 --- .github/workflows/pipeline.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index b795f64..86c916b 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -63,7 +63,7 @@ jobs: --image-repository ${IMAGE_REPOSITORY} \ --region ${REGION} \ --output-template-file packaged.yaml - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: packaged.yaml path: packaged.yaml @@ -76,7 +76,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v2 - uses: aws-actions/setup-sam@v1 - - uses: actions/download-artifact@v4.1.7 + - uses: actions/download-artifact@v3 with: name: packaged.yaml From bc903451a5a768e4659b787cd7a7dcef3037b5d3 Mon Sep 17 00:00:00 2001 From: Lakshay Manchanda Date: Mon, 16 Sep 2024 02:07:32 +0530 Subject: [PATCH 4/4] Added approval status to new Diff --- layer/utils/validation.go | 1 + 1 file changed, 1 insertion(+) diff --git a/layer/utils/validation.go b/layer/utils/validation.go index 78571fb..70b2ea5 100644 --- a/layer/utils/validation.go +++ b/layer/utils/validation.go @@ -11,6 +11,7 @@ import ( func resToDiff(res Res, userId string) Diff { return Diff{ + Approval: "PENDING", UserId: userId, Timestamp: time.Now(), FirstName: res.FirstName,