-
Notifications
You must be signed in to change notification settings - Fork 35
feat: support go provided.al2 runtime #1559
Conversation
⏱ Benchmark resultsComparing with 8788624 largeDepsEsbuild: 3.6s⬆️ 1.32% increase vs. 8788624
LegendlargeDepsNft: 11.5s⬆️ 3.13% increase vs. 8788624
LegendlargeDepsZisi: 21.9s⬆️ 3.88% increase vs. 8788624
|
src/runtimes/go/index.ts
Outdated
config, | ||
path: zipPath, | ||
entryFilename: zipOptions.filename, | ||
goUseAL2Runtime: featureFlags.zisi_golang_use_al2, |
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.
What will we do with this property?
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.
We'll read it in open-api, so we can propagate it through nf-server into BitBalloon and functions-origin. They can then read it and use provided.al2
as the AWS runtime, if it's present. If you have an idea for a solution where we don't need to propagate this so far, i'd be happy to hear it!
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.
Could we use the existing runtimeVersion
property for that?
zip-it-and-ship-it/src/manifest.ts
Line 16 in 626d63d
runtimeVersion?: string |
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.
I guess so, but that'd still require changes to all three services. But that field is probably better-suited. I'll make that update!
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.
done in 80a3c66
config, | ||
path: zipPath, | ||
entryFilename: zipOptions.filename, | ||
runtimeVersion: featureFlags.zisi_golang_use_al2 ? 'provided.al2' : undefined, |
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.
Just for consistency with what we do in Node.js, it might be nice to always return the runtime version, even if it's the old one.
Not a big deal, though.
runtimeVersion: featureFlags.zisi_golang_use_al2 ? 'provided.al2' : undefined, | |
runtimeVersion: featureFlags.zisi_golang_use_al2 ? 'provided.al2' : 'go1.x', |
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.
Thought about that as well, but I didn't want to introduce changes when the flag is off. undefined
should do that.
* feat: support go provided.al2 runtime * refactor: write into runtimeVersion
🎉 Thanks for submitting a pull request! 🎉
Summary
AWS will deprecate the
go1.x
runtime by end of year, asking customers to deploy toprovided.al2
going forward. It requires ZIPs to contain a single file calledbootstrap
, similar to Rust. This PR adds a featureflag to ZISI that makes that switch, and writes the result of it intomanifest.json
so we can detect this during deployment.Part of https://github.com/netlify/pod-dev-foundations/issues/581.
For us to review and ship your PR efficiently, please perform the following steps:
This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing
a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)