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

Maintenance: build Lambda Layers from source during tests #1709

Closed
1 of 2 tasks
dreamorosi opened this issue Sep 25, 2023 · 2 comments · Fixed by #1710
Closed
1 of 2 tasks

Maintenance: build Lambda Layers from source during tests #1709

dreamorosi opened this issue Sep 25, 2023 · 2 comments · Fixed by #1710
Assignees
Labels
automation This item relates to automation completed This item is complete and has been merged/shipped internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) layers Items related to the Lambda Layers pipeline

Comments

@dreamorosi
Copy link
Contributor

dreamorosi commented Sep 25, 2023

Summary

Currently the LayerPublisher construct that we use to deploy Lambda Layers during integration tests and new releases always defaults to installing the Powertools utilities from npmjs.com. This means that we don't have any way to testing the code that we haven't released in Lambda Layers.

This issue proposes to introduce a way to run the integration tests for the layers workspace using Powertools utilities that are build from source rather than downloaded from npmjs.com (see "Solution" section below for visual representation of the proposal).

This will allow us to easily test changes that we make to:

  • the utilities & their exports/build process
  • the way we package & deploy layers
  • test behaviors that are present only in Layers

Without the change above we have no way of covering these cases unless we make a release first.

Why is this needed?

Up until now our Lambda Layers usage was fairly straightforward as it involved only our core utilities (Tracer, Metrics, Logger) which always shipped with their own dependencies.

In the past couple of weeks alone however the complexity has increased significantly due to separate work streams that involve deploying unpublished versions:

For this reason we should have a way to run integration tests for the layer workspace using Powertools utilities built from source rather then the ones from the last published release.

Which area does this relate to?

Automation

Solution

Visual representation of current process:

graph TB
  A[Run layers e2e tests] --> B[Create tmp/nodejs folder]
  B --> C[Download utilities from registry]
  C --> D[Create zip archive]
  D --> E[Deploy Layers]
  E --> F[Run tests in a function that uses Layer]
Loading

Visual representation of proposed process:

graph TD
  A[Run layers e2e tests] --> B[Create tmp/nodejs folder]
  B --> C[Build utilities from source]
  C --> D[Install built utilities from tar.gz]
  D --> E[Create zip archive]
  E --> F[Deploy Layers]
  F --> G[Run tests in a function that uses Layer]
Loading

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

@dreamorosi dreamorosi added automation This item relates to automation internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) confirmed The scope is clear, ready for implementation layers Items related to the Lambda Layers pipeline labels Sep 25, 2023
@dreamorosi dreamorosi self-assigned this Sep 25, 2023
@github-actions
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions github-actions bot added pending-release This item has been merged and will be released soon and removed confirmed The scope is clear, ready for implementation labels Sep 25, 2023
@github-actions
Copy link
Contributor

This is now released under v1.14.0 version!

@github-actions github-actions bot added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation This item relates to automation completed This item is complete and has been merged/shipped internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) layers Items related to the Lambda Layers pipeline
Projects
Development

Successfully merging a pull request may close this issue.

1 participant