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

feat(sdk): aws.Function.context() for lambda functions #6424

Merged
merged 16 commits into from May 21, 2024

Conversation

Chriscbr
Copy link
Contributor

@Chriscbr Chriscbr commented May 6, 2024

Closes #6412

Checklist

  • Title matches Winglang's style guide
  • Description explains motivation and solution
  • Tests added (always)
  • Docs updated (only required for features)
  • Added pr/e2e-full label if this feature requires end-to-end testing

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

Copy link

github-actions bot commented May 6, 2024

Thanks for opening this pull request! 🎉
Please consult the contributing guidelines for details on how to contribute to this project.
If you need any assistence, don't hesitate to ping the relevant owner over Discord.

Topic Owner
Wing SDK and utility APIs @chriscbr
Wing Console @ainvoner, @skyrpex, @polamoros
JSON, structs, primitives and collections @hasanaburayyan
Platforms and plugins @hasanaburayyan
Frontend resources (website, react, etc) @tsuf239
Language design @chriscbr
VSCode extension and language server @markmcculloh
Compiler architecture, inflights, lifting @yoav-steinberg
Wing Testing Framework @tsuf239
Wing CLI @markmcculloh
Build system, dev environment, releases @markmcculloh
Library Ecosystem @chriscbr
Documentation @hasanaburayyan
SDK test suite @tsuf239
Examples @hasanaburayyan
Wing Playground @eladcon

@monadabot
Copy link
Contributor

monadabot commented May 6, 2024

Console preview environment is available at https://wing-console-pr-6424.fly.dev 🚀

Last Updated (UTC) 2024-05-21 03:45

@monadabot
Copy link
Contributor

monadabot commented May 6, 2024

Benchmarks

Comparison to Baseline 🟥🟥⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
Benchmark Before After Change
version 57ms±0.33 59ms±0.9 +2ms (+3.11%)🟥
functions_10.test.w -t sim 485ms±11.04 522ms±9.34 +37ms (+7.69%)🟥
functions_10.test.w -t tf-aws 2055ms±14.89 2082ms±21.52 +27ms (+1.32%)⬜
hello_world.test.w -t sim 405ms±5.98 410ms±6.57 +5ms (+1.28%)⬜
hello_world.test.w -t tf-aws 1446ms±5.65 1453ms±9.32 +8ms (+0.52%)⬜
functions_1.test.w -t sim 401ms±5.73 410ms±6.31 +8ms (+2.04%)⬜
functions_1.test.w -t tf-aws 834ms±9.99 851ms±7.36 +16ms (+1.96%)⬜
jsii_big.test.w -t sim 2813ms±12.43 2820ms±15.22 +6ms (+0.23%)⬜
jsii_big.test.w -t tf-aws 3029ms±6.65 3030ms±18.19 +1ms (+0.02%)⬜
empty.test.w -t sim 367ms±3.63 373ms±6.8 +7ms (+1.8%)⬜
empty.test.w -t tf-aws 600ms±4.98 600ms±4.48 +0ms (+0.03%)⬜
jsii_small.test.w -t sim 380ms±3.19 378ms±1.87 -2ms (-0.6%)⬜
jsii_small.test.w -t tf-aws 618ms±3.85 615ms±4.38 -3ms (-0.54%)⬜

⬜ Within 1.5 standard deviations
🟩 Faster, Above 1.5 standard deviations
🟥 Slower, Above 1.5 standard deviations

Benchmarks may vary outside of normal expectations, especially when running in GitHub Actions CI.

Results
name mean min max moe sd
version 59ms 57ms 62ms 1ms 1ms
functions_10.test.w -t sim 522ms 500ms 536ms 9ms 13ms
functions_10.test.w -t tf-aws 2082ms 2040ms 2135ms 22ms 30ms
hello_world.test.w -t sim 410ms 395ms 423ms 7ms 9ms
hello_world.test.w -t tf-aws 1453ms 1431ms 1475ms 9ms 13ms
functions_1.test.w -t sim 410ms 401ms 429ms 6ms 9ms
functions_1.test.w -t tf-aws 851ms 838ms 868ms 7ms 10ms
jsii_big.test.w -t sim 2820ms 2783ms 2858ms 15ms 21ms
jsii_big.test.w -t tf-aws 3030ms 2996ms 3075ms 18ms 25ms
empty.test.w -t sim 373ms 363ms 394ms 7ms 10ms
empty.test.w -t tf-aws 600ms 591ms 610ms 4ms 6ms
jsii_small.test.w -t sim 378ms 372ms 381ms 2ms 3ms
jsii_small.test.w -t tf-aws 615ms 606ms 627ms 4ms 6ms
Last Updated (UTC) 2024-05-21 03:50

@Chriscbr Chriscbr changed the title feat(sdk): aws.context() for lambda functions feat(sdk): aws.Function.context() for lambda functions May 17, 2024
@Chriscbr Chriscbr marked this pull request as ready for review May 17, 2024 21:21
@Chriscbr Chriscbr requested a review from a team as a code owner May 17, 2024 21:21
@Chriscbr Chriscbr requested a review from eladb May 17, 2024 21:21
monadabot and others added 3 commits May 17, 2024 17:35
Signed-off-by: monada-bot[bot] <monabot@monada.co>
Signed-off-by: monada-bot[bot] <monabot@monada.co>
@monadabot monadabot added the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label May 17, 2024
@Chriscbr Chriscbr removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label May 18, 2024
libs/awscdk/src/function.ts Outdated Show resolved Hide resolved
libs/wingsdk/src/target-tf-aws/function.ts Outdated Show resolved Hide resolved
@Chriscbr Chriscbr requested a review from eladb May 19, 2024 01:27
Signed-off-by: monada-bot[bot] <monabot@monada.co>
@monadabot monadabot added the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label May 21, 2024
@Chriscbr Chriscbr removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label May 21, 2024
Copy link
Contributor

mergify bot commented May 21, 2024

Thanks for contributing, @Chriscbr! This PR will now be added to the merge queue, or immediately merged if rybickic/aws-lambda-context is up-to-date with main and the queue is empty.

@mergify mergify bot merged commit a93ede6 into main May 21, 2024
15 checks passed
@mergify mergify bot deleted the rybickic/aws-lambda-context branch May 21, 2024 03:54
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.74.2.

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.

Access AWS lambda context in wing
4 participants