Skip to content
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

Update Lambda Handler Name #5

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Update Lambda Handler Name #5

merged 2 commits into from
Jan 24, 2024

Conversation

cabutlermit
Copy link
Contributor

@cabutlermit cabutlermit commented Jan 24, 2024

Purpose and background context

Align the file naming and function naming with the infrastructure updates in mitlib-tf-workloads-libraries-website PR#50.

Fundamentally, the porimary change here is the name of the Python function in the lambda_edge.py file. The other changes here are updates to the various tests (so that they use the new function name) and an ADR to match up to mitlib-tf-workloads-libraries-website ADR#8.

Additionally, we add the prod deploy GitHub Actions workflow.

How can a reviewer manually see the effects of these changes?

This is already deployed in Dev1. This Lambda@Edge function handles the origin-request routing for requests to our "custom domain" CDN. You can verify that this is working correctly by visiting

What happens next

PR#50 has been approved, but not yet merged to stage nor deployed in Stage-Workloads. There is also the pending cf-lambda-geo-auth PR#2 that needs to be approved. Once all three of these PRs are approved, the following will be the next steps.

  1. Merge this approved PR to main and verify that the updated .zip file is pushed to the shared-files-xxxx S3 bucket in Stage-Workloads.
  2. Merge PR#2 and verify that the updated .zip file is pushed to the shared-files-xxxx S3 bucket in Stage-Workloads.
  3. Merge PR#50 to stage and then deploy the updated infrastructure to Stage-Workloads.
  4. Run through tests in Stage-Workloads to verify that everything is deployed and functioning as expected.

Includes new or updated dependencies?

NO

Changes expectations for external applications?

NO

What are the relevant tickets?

Developer

  • The Dev CF Lambda@Edge Full Deploy workflow has been run to update CloudFront in Dev1
  • All related Jira tickets are linked in commit message(s)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer(s)

  • The commit message is clear and follows our guidelines (not just this PR message)
  • There are appropriate tests covering any new functionality
  • The provided documentation is sufficient for understanding any new functionality introduced
  • Any manual tests have been performed and verified
  • New dependencies are appropriate or there were no changes

Why these changes are being introduced:
There is a tight interdependency between the name of the Python
function and the file in which that function lives and the Terraform
definition of the Lambda that relies on this repository. In order to
keep these in sync, we document the naming decision in both this repo
and in the Terraform repo and make the appropriate changes

See ADR#8 in mitlib-tf-workloads-libraries-website

How this addresses that need:
* Create an ADR in this repo that captures the name of the function that
is the handler function and the name of the .py file that contains that
function.
* Update the function name in the lambda_edge.py file
* In preparation for the full dev/stage/prod workflow, we add the
production deploy GitHub workflow
Copy link

github-actions bot commented Jan 24, 2024

Pull Request Test Coverage Report for Build 7645872395

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 7558864186: 0.0%
Covered Lines: 22
Relevant Lines: 22

💛 - Coveralls

@cabutlermit cabutlermit marked this pull request as ready for review January 24, 2024 20:08
JPrevost
JPrevost previously approved these changes Jan 24, 2024
Copy link
Member

@JPrevost JPrevost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment I made doesn't really affect me so if it is correct don't worry about the fact I don't understand it :)

.github/workflows/prod-cf-deploy-lambda.yml Outdated Show resolved Hide resolved
Why these changes are being introduced:
There was a discrepancy between the documentation in the production GHA
workflow for deploying the app and what the workflow actually did.

How this addresses that need:
* Fix the comment header for the prod deploy workflow for the Lambda
function

Side effects of this change:
None.
@cabutlermit cabutlermit merged commit 47c24a8 into main Jan 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants