-
Notifications
You must be signed in to change notification settings - Fork 1
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: [#188558362] upgrade serverless to v4 #9241
Conversation
f67be66
to
20725bf
Compare
5fad1f1
to
b6b74fd
Compare
ad1a2c7
to
d93ed7f
Compare
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.
Super impressed you were able to implement this in such a short amount of time. Well done, Ade!
Also, do we need to update our |
d93ed7f
to
3f588c2
Compare
4faf1fa
to
aabe5a2
Compare
For this piece we only added the field for the the deployment key. since we no longer need to add the key to the .env file based on Case's comment. |
api/.env-template
Outdated
@@ -40,3 +40,4 @@ DYNAMICS_ELEVATOR_SAFETY_CLIENT_ID= | |||
DYNAMICS_ELEVATOR_SAFETY_SECRET= | |||
FEATURE_DYNAMICS_PUBLIC_MOVERS= | |||
USE_WIREMOCK_FOR_FORMATION_AND_BUSINESS_SEARCH= | |||
BIZNJ_SLS_DEPLOYMENT_BUCKET_NAME= |
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.
Do we actually need this in our .env file? I think the answer is no, but if we need it then we should add this value to api/.env
in Bitwarden.
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.
Yh updated that. We have a fall back as default-bucket which would avoid the
[@businessnjgovnavigator/api]: Packaging "businessnjgov-api" for stage "local" (*********)
[@businessnjgovnavigator/api]:
[@businessnjgovnavigator/api]: ✖ Access denied when storing the parameter "/serverless-framework/deployment/s3-bucket". Please check your permissions and try again. You have the following op
at 'provider.deploymentBucket': must NOT have fewer than 3 characters``` error
2 brief comments The only other thing I'd like to validate is that we've deployed this successfully to the |
aabe5a2
to
dad0083
Compare
dad0083
to
bb96197
Compare
Yh this was also deployed to testing and there were no issue. |
Description
This PR upgrades the Navigator repository to Serverless Framework V4, addressing the end-of-life (EOL) and end-of-support status of V3. The upgrade ensures compatibility with the latest features, resolves deprecations and enhances security by aligning with updated best practices in V4.
Ticket
This pull request resolves #188558362.
Approach
The approach taken in this PR involved updating package dependencies to ensure compatibility with
Serverless Framework v4
, as the framework has reached its end of life and support for v3. Environment variable references were adjusted to include theSERVERLESS_ACCESS_KEY
, which triggers theserverless login
process, and a deployment bucket configuration was added for better stage-specific management. Additionally, the need for webpack has been eliminated since Serverless Framework v4 introduces native ESBuild support, simplifying the build process and reducing dependency complexity. This also enhances security and maintainability by removing outdated tools. The updates ensure that the project aligns with the latest Serverless Framework standards and best practices.Steps to Test
Push Changes to Test Branch: The changes were pushed to the test branch to ensure that the updates were applied to the appropriate environment.
Validate Deployment: After pushing the changes, I validated the deployment by checking that the
serverless-state.json
file reflects the expected version 4 format, confirming that the migration toServerless V4
was successful.Notes
Code author checklist
userData
(includingprofileData
,formationData
etc), then I added a new migration filecmsCollections.ts
(see CMS Additions in Engineering Reference/FAQ on the engineering documentation site).env
values in both.env-template
and in Bitwarden