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

BAU: Migrate all lambdas to endpoint-module-v2 #5644

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

whi-tw
Copy link
Contributor

@whi-tw whi-tw commented Dec 9, 2024

What

endpoint-module is quite inefficient, as it does a number of data queries internally. Additionally, all of its' logic is implemented in endpoint-lambda.

I've migrated all our lambdas over to use endpoint-module-v2.

This new module has the following benefits:

  • It does not do data queries internally, instead requiring these values to be passed in. This reduces the time for apply, as we will no longer needlessly re-request the same information over and over again
  • It uses endpoint-lambda as the lambda-creation engine, which means we have configuration in only one place
  • It exposes the endpoints required to create a openapi-backed API Gateway in future.

Additionally, I've stopped looking up the account alias and the slack SNS topic within each component, instead retrieving them from shared state. This further reduces the number of data lookups.

Finally, I've shifted dynatrace.tf out of the individual components, and into the parent directory, and have symlinked it in to the individual directories, removing the possibility of different modules getting out of sync.
This is the same pattern as we use with versions.tf

How to review

  • Code Review
  • Deploy it to a dev environment and check it works okay

@whi-tw whi-tw requested review from a team as code owners December 9, 2024 15:27
Copy link

github-actions bot commented Dec 9, 2024

Java Tests Skipped

No Java files were changed in this pull request. Java tests will be skipped1.

Any Java files that are changed in a subsequent commit will trigger the Java tests.

Footnotes

  1. These tests will still show as passing in the PR status check, but will not actually have run.

@whi-tw whi-tw force-pushed the whi-tw/BAU/unify-lambda-module-use branch 3 times, most recently from 2976f62 to c4f507a Compare December 11, 2024 16:23
@whi-tw whi-tw force-pushed the whi-tw/BAU/unify-lambda-module-use branch from c4f507a to ddf49c5 Compare December 16, 2024 09:31
@whi-tw whi-tw requested a review from pskushwaha1 December 16, 2024 10:01
@whi-tw whi-tw force-pushed the whi-tw/BAU/unify-lambda-module-use branch 4 times, most recently from 6d4dacb to 40d8d70 Compare December 18, 2024 11:39
@whi-tw whi-tw force-pushed the whi-tw/BAU/unify-lambda-module-use branch from 40d8d70 to a917068 Compare December 19, 2024 10:10
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