-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(): update lambdas to node20/arm64 #1263
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe recent updates across various Lambda functions and configurations primarily focus on enhancing build processes, updating runtime environments, and refining error handling. Key changes include adopting AWS's SAM for building, transitioning to Node.js 20.x, and shifting to ARM64 architecture. Additionally, error handling and TypeScript configurations have been meticulously adjusted to improve performance and maintainability. Changes
This table groups similar file changes and summarizes the modifications succinctly to provide a clear overview of the updates across the system. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
#338 Bundle Size — 3.38MiB (0%).Warning Bundle contains 2 duplicate packages – View duplicate packages Bundle metrics
|
Current #338 |
Baseline #333 |
|
---|---|---|
Initial JS | 2.98MiB |
2.98MiB |
Initial CSS | 9.54KiB |
9.54KiB |
Cache Invalidation | 49.55% |
29.63% |
Chunks | 67 |
67 |
Assets | 80 |
80 |
Modules | 1982 |
1982 |
Duplicate Modules | 283 |
283 |
Duplicate Code | 8.21% |
8.21% |
Packages | 207 |
207 |
Duplicate Packages | 2 |
2 |
Bundle size by type no changes
Current #338 |
Baseline #333 |
|
---|---|---|
JS | 3.26MiB |
3.26MiB |
Fonts | 94.54KiB |
94.54KiB |
Other | 9.6KiB |
9.6KiB |
CSS | 9.54KiB |
9.54KiB |
IMG | 8.57KiB |
8.57KiB |
Bundle analysis report Branch JoeKarow/lambda-updates Project dashboard
📦 Next.js Bundle Analysis for @weareinreach/appThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (13)
- lambdas/cognito-messaging/Makefile (1 hunks)
- lambdas/cognito-messaging/package.json (1 hunks)
- lambdas/cognito-messaging/src/index.ts (2 hunks)
- lambdas/cognito-messaging/template.yaml (1 hunks)
- lambdas/cognito-messaging/tsconfig.json (1 hunks)
- lambdas/cognito-user-migrate/Makefile (1 hunks)
- lambdas/cognito-user-migrate/package.json (2 hunks)
- lambdas/cognito-user-migrate/src/getUser.ts (1 hunks)
- lambdas/cognito-user-migrate/src/verifyUser.ts (2 hunks)
- lambdas/cognito-user-migrate/template.yaml (2 hunks)
- lambdas/cognito-user-migrate/tsconfig.json (2 hunks)
- packages/db/package.json (1 hunks)
- packages/db/prisma/schema.prisma (1 hunks)
Files skipped from review due to trivial changes (3)
- lambdas/cognito-messaging/Makefile
- lambdas/cognito-messaging/tsconfig.json
- lambdas/cognito-user-migrate/src/getUser.ts
Additional comments not posted (13)
lambdas/cognito-user-migrate/Makefile (1)
3-7
: Ensure that thepnpm
commands are correctly configured for your environment.lambdas/cognito-user-migrate/tsconfig.json (2)
4-7
: Confirm that the new path mappings align with your project's directory structure.Verification successful
The shell script execution confirms that the directories referenced in the
tsconfig.json
path mappings do indeed exist in the repository. Specifically, the script checked for the presence of directories underlambdas/cognito-user-migrate/*
andpackages/db/*
, and both commands returned a list of existing directories and files, which aligns with the paths specified in thetsconfig.json
.Given this information, the path mappings in the
tsconfig.json
are correctly set according to the current project structure. Therefore, the new path mappings are verified to be accurate and align with the directory structure of the project.
The path mappings in
tsconfig.json
are correctly aligned with the project's directory structure.
- The paths
~/*
and~db/*
intsconfig.json
correctly map to the directorieslambdas/cognito-user-migrate/*
andpackages/db/*
respectively.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the directories referenced in the path mappings exist. # Test: Check if directories exist. ls -d lambdas/cognito-user-migrate/* && ls -d packages/db/*Length of output: 1413
19-19
: TheisolatedModules
flag is set to true, which is good practice to ensure non-transitive modules are correctly handled.lambdas/cognito-messaging/template.yaml (2)
7-11
: Ensure that the runtime and architecture settings are compatible with your deployment targets.
16-30
: The addition of aMessageLogGroup
with a 30-day retention policy is a good practice for managing logs. Confirm that the log group name and retention settings are as intended.lambdas/cognito-user-migrate/template.yaml (2)
7-12
: Verify that the runtime and architecture settings are correctly configured for thecognito-user-migrate
Lambda.
27-31
: TheMessageLogGroup
resource is correctly configured with a 30-day retention policy. Ensure that the log group name is correctly formatted and matches your naming conventions.lambdas/cognito-messaging/package.json (1)
10-10
: The updated build script usessam build --build-in-source
, which is appropriate for building AWS Lambda functions. Ensure that this change is reflected in your CI/CD pipelines.lambdas/cognito-user-migrate/src/verifyUser.ts (2)
15-15
: Ensure that the Prisma query is correctly formed and that the fields selected are necessary for the function's logic.
40-40
: The updated error handling forPrismaClientKnownRequestError
with specific error code 'P2025' is a good practice for handling known request errors. Ensure that this error code is correctly documented in your project's error handling guidelines.lambdas/cognito-user-migrate/package.json (1)
Line range hint
10-21
: The updated scripts for database generation, building, and client pruning are well-defined. Ensure that these scripts are integrated into your build process and that the paths and options used are correct for your project structure.lambdas/cognito-messaging/src/index.ts (1)
33-35
: The handler function signature has been updated to use a more specific type, enhancing type safety. Confirm that all invocations of this handler are updated to match the new signature.Verification successful
The search results indicate that the
handler
function inlambdas/cognito-messaging/src/index.ts
is correctly defined with the new signature asCustomMessageTriggerHandler
. This matches the expected update mentioned in the review comment. There are no other instances in the codebase where this specific handler function from thecognito-messaging
Lambda is invoked incorrectly or with an outdated signature.Given this information, the update to the handler function signature has been successfully verified, and there are no discrepancies or issues found related to this change in the codebase.
- File:
lambdas/cognito-messaging/src/index.ts
- The
handler
function is correctly defined with the typeCustomMessageTriggerHandler
.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `handler` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type typescript $'handler'Length of output: 65
Script:
#!/bin/bash # Description: Verify all function calls to `handler` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type ts $'handler'Length of output: 78265
packages/db/prisma/schema.prisma (1)
6-10
: The new Prisma generator configuration for ARM64 architecture looks good.
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/db/package.json (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/db/package.json
Pull Request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Refactor
Documentation
Chore
Bug Fixes