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

pluto-message-ingestion: remove externals from ncc config #1180

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

Conversation

andrew-nowak
Copy link
Member

What does this change?

Remove the "externals" field from pluto message ingestion's ncc config.

The externals field excludes a package from the bundled JS output. This could be used in AWS Lambda runtimes <= 16 which bundled the v2 AWS JS SDK. However 18 and above bundle the v3 SDK, so we need to either 1) stop excluding the SDK from the bundle or 2) migrate to the v3 SDK. We should probably do both (the first so we have confidence about which version of the SDK is being used at runtime, the second to keep uptodate with library updates) but for now I'm focused on upgrading the runtime, so we'll come back to the SDK upgrade at a later date.

How to test

cd pluto-message-ingestion; yarn; yarn build. Before this change, the bundled output is 34kB (11kB zipped). After this change it is ~10.7MB (1.3MB zipped).

(That's a huge increase but still well within AWS limits, so we'll live with it. Moving the v3 SDK will help as the unused parts of the SDK are more easily excluded by bundlers like ncc).

How can we measure success?

Lambda can run on the Node 18 runtime.

Have we considered potential risks?

Images

Accessibility

@andrew-nowak andrew-nowak marked this pull request as ready for review November 25, 2024 16:46
@andrew-nowak andrew-nowak requested a review from a team as a code owner November 25, 2024 16:46
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.

1 participant