netlify / zip-it-and-ship-it

Intelligently prepare Node.js Lambda functions for deployment
https://www.npmjs.com/package/@netlify/zip-it-and-ship-it
MIT License
316 stars 35 forks source link

feat: support go provided.al2 runtime #1559

Closed Skn0tt closed 1 year ago

Skn0tt commented 1 year ago

๐ŸŽ‰ Thanks for submitting a pull request! ๐ŸŽ‰

Summary

AWS will deprecate the go1.x runtime by end of year, asking customers to deploy to provided.al2 going forward. It requires ZIPs to contain a single file called bootstrap, similar to Rust. This PR adds a featureflag to ZISI that makes that switch, and writes the result of it into manifest.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:

A picture of a cute animal (not mandatory, but encouraged)

github-actions[bot] commented 1 year ago

โฑ Benchmark results

Comparing with 87886247aa8acabd74cf76f13c3465a22bf63078

largeDepsEsbuild: 3.6s

โฌ†๏ธ 1.32% increase vs. 87886247aa8acabd74cf76f13c3465a22bf63078

^                           3.5s    3.6s  
โ”‚                           โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”  
โ”‚                           |  |    |โ–’โ–’|  
โ”‚                           |  |    |โ–’โ–’|  
โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€|โ–’โ–’|โ”€โ”€
โ”‚   2.6s    2.7s    2.7s    |  |    |โ–’โ–’|  
โ”‚   โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€>
    T-4     T-3     T-2     T-1      T    
Legend - T-4 (38cde6efec37b5d60593c15810f756da8b5177e6): 2.6s - T-3 (2211f39741e1088a7c9cde0af57c9bc27108c606): 2.7s - T-2 (54b79e3c973805ed06c5ec4bc0259a122a880913): 2.7s - T-1 (87886247aa8acabd74cf76f13c3465a22bf63078): 3.5s - **T (current commit): 3.6s**

largeDepsNft: 11.5s

โฌ†๏ธ 3.13% increase vs. 87886247aa8acabd74cf76f13c3465a22bf63078

^                                  11.5s  
โ”‚                          11.2s    โ”Œโ”€โ”€โ”  
โ”‚                           โ”Œโ”€โ”€โ”    |โ–’โ–’|  
โ”‚                           |  |    |โ–’โ–’|  
โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€|โ–’โ–’|โ”€โ”€
โ”‚           8.4s    8.4s    |  |    |โ–’โ–’|  
โ”‚   8.2s    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    |  |    |โ–’โ–’|  
โ”‚   โ”Œโ”€โ”€โ”    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€>
    T-4     T-3     T-2     T-1      T    
Legend - T-4 (38cde6efec37b5d60593c15810f756da8b5177e6): 8.2s - T-3 (2211f39741e1088a7c9cde0af57c9bc27108c606): 8.4s - T-2 (54b79e3c973805ed06c5ec4bc0259a122a880913): 8.4s - T-1 (87886247aa8acabd74cf76f13c3465a22bf63078): 11.2s - **T (current commit): 11.5s**

largeDepsZisi: 21.9s

โฌ†๏ธ 3.88% increase vs. 87886247aa8acabd74cf76f13c3465a22bf63078

^                                  21.9s  
โ”‚                           21s     โ”Œโ”€โ”€โ”  
โ”‚                           โ”Œโ”€โ”€โ”    |โ–’โ–’|  
โ”‚                           |  |    |โ–’โ–’|  
โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€|โ–’โ–’|โ”€โ”€
โ”‚                  16.4s    |  |    |โ–’โ–’|  
โ”‚  15.8s   15.6s    โ”Œโ”€โ”€โ”    |  |    |โ–’โ–’|  
โ”‚   โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€>
    T-4     T-3     T-2     T-1      T    
Legend - T-4 (38cde6efec37b5d60593c15810f756da8b5177e6): 15.8s - T-3 (2211f39741e1088a7c9cde0af57c9bc27108c606): 15.6s - T-2 (54b79e3c973805ed06c5ec4bc0259a122a880913): 16.4s - T-1 (87886247aa8acabd74cf76f13c3465a22bf63078): 21s - **T (current commit): 21.9s**