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(platforms): support platform parameters #5557

Merged
merged 24 commits into from Feb 8, 2024
Merged

Conversation

hasanaburayyan
Copy link
Collaborator

@hasanaburayyan hasanaburayyan commented Jan 27, 2024

This PR introduces has two main changes:

  • The ability to now define platform specific parameters as a JsonSchema object.
  • A change in the tf-aws platform that will now allow users to specify their own vpc when creating resources that need to be deployed behind a vpc (right now just redis)

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.

@monadabot
Copy link
Contributor

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 Slack.

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 @eladb
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 @skorfmann
Wing Playground @eladcon

apps/wing/src/cli.ts Outdated Show resolved Hide resolved
@monadabot
Copy link
Contributor

monadabot commented Jan 29, 2024

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

Last Updated (UTC) 2024-02-08 02:28

apps/wing/src/cli.ts Outdated Show resolved Hide resolved
@monadabot
Copy link
Contributor

monadabot commented Jan 29, 2024

Benchmarks

Comparison to Baseline ⬜⬜🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
Benchmark Before After Change
version 59ms±0.39 60ms±0.76 +2ms (+2.67%)⬜
functions_10.test.w -t sim 646ms±35.42 651ms±12.04 +5ms (+0.73%)⬜
functions_10.test.w -t tf-aws 2269ms±10.3 2367ms±15.02 +98ms (+4.3%)🟥
functions_1.test.w -t sim 509ms±5.65 540ms±7.52 +30ms (+5.97%)🟥
functions_1.test.w -t tf-aws 878ms±6.62 974ms±6.68 +96ms (+10.94%)🟥
hello_world.test.w -t sim 507ms±5.36 542ms±4.9 +35ms (+6.82%)🟥
hello_world.test.w -t tf-aws 1366ms±11.4 1676ms±15.44 +310ms (+22.7%)🟥
jsii_small.test.w -t sim 476ms±3.7 504ms±4.5 +28ms (+5.89%)🟥
jsii_small.test.w -t tf-aws 640ms±3.56 724ms±5.39 +85ms (+13.23%)🟥
jsii_big.test.w -t sim 2916ms±10.31 2950ms±10.08 +34ms (+1.15%)🟥
jsii_big.test.w -t tf-aws 3085ms±9.64 3162ms±12.38 +76ms (+2.47%)🟥
empty.test.w -t sim 468ms±4.87 499ms±5.39 +31ms (+6.52%)🟥
empty.test.w -t tf-aws 633ms±5.39 714ms±6.28 +81ms (+12.8%)🟥

⬜ 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 60ms 59ms 63ms 1ms 1ms
functions_10.test.w -t sim 651ms 631ms 682ms 12ms 17ms
functions_10.test.w -t tf-aws 2367ms 2334ms 2397ms 15ms 21ms
functions_1.test.w -t sim 540ms 521ms 557ms 8ms 11ms
functions_1.test.w -t tf-aws 974ms 963ms 989ms 7ms 9ms
hello_world.test.w -t sim 542ms 531ms 549ms 5ms 7ms
hello_world.test.w -t tf-aws 1676ms 1648ms 1707ms 15ms 22ms
jsii_small.test.w -t sim 504ms 493ms 516ms 5ms 6ms
jsii_small.test.w -t tf-aws 724ms 714ms 737ms 5ms 8ms
jsii_big.test.w -t sim 2950ms 2931ms 2969ms 10ms 14ms
jsii_big.test.w -t tf-aws 3162ms 3132ms 3190ms 12ms 17ms
empty.test.w -t sim 499ms 485ms 510ms 5ms 8ms
empty.test.w -t tf-aws 714ms 692ms 722ms 6ms 9ms
Last Updated (UTC) 2024-02-08 02:34

@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 Jan 29, 2024
@hasanaburayyan hasanaburayyan marked this pull request as ready for review January 30, 2024 22:20
@hasanaburayyan hasanaburayyan requested a review from a team as a code owner January 30, 2024 22:20
@hasanaburayyan
Copy link
Collaborator Author

@eladb I went down the intermediate step of defining platform parameters in Jsonschema. Let me know what you think. I still need to update the platform docs, but I figured I would wait until I get some thoughts about the design, and if it makes sense to keep things this way.

@hasanaburayyan
Copy link
Collaborator Author

@marciocadev I also requested your review incase you want to see any of these changes (since you built the initial platform specific code)

@marciocadev
Copy link
Collaborator

marciocadev commented Jan 30, 2024

Man, I don't even know what to say, the use of json-schema to create the required parameters was brilliant

I love it ❤️❤️❤️

apps/wing/src/cli.ts Outdated Show resolved Hide resolved
libs/wingsdk/src/platform/util.ts Show resolved Hide resolved
@hasanaburayyan hasanaburayyan removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Jan 31, 2024
@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 Jan 31, 2024
@hasanaburayyan hasanaburayyan removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Jan 31, 2024
hasanaburayyan and others added 10 commits February 6, 2024 08:56
Signed-off-by: monada-bot[bot] <monabot@monada.co>
Co-authored-by: Marcio Cruz de Almeida <67694075+marciocadev@users.noreply.github.com>
Signed-off-by: monada-bot[bot] <monabot@monada.co>
Copy link
Collaborator

@marciocadev marciocadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it

@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 Feb 7, 2024
Copy link
Contributor

@Chriscbr Chriscbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really well done! I've added some minor comments, but it looks solid overall to me :-)

apps/wing/src/cli.ts Outdated Show resolved Hide resolved
docs/docs/02-concepts/03-platforms.md Show resolved Hide resolved
docs/docs/02-concepts/03-platforms.md Outdated Show resolved Hide resolved
libs/wingsdk/src/shared-aws/domain.ts Outdated Show resolved Hide resolved
libs/wingsdk/src/target-tf-aws/platform.ts Outdated Show resolved Hide resolved
libs/wingsdk/src/shared-aws/domain.ts Outdated Show resolved Hide resolved
libs/wingsdk/src/platform/util.ts Outdated Show resolved Hide resolved
libs/wingsdk/src/platform/util.ts Outdated Show resolved Hide resolved
libs/wingsdk/src/platform/parameter-registrar.ts Outdated Show resolved Hide resolved
@hasanaburayyan hasanaburayyan removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Feb 8, 2024
Copy link
Contributor

mergify bot commented Feb 8, 2024

Thanks for contributing, @hasanaburayyan! This PR will now be added to the merge queue, or immediately merged if hasan/private-vpcs is up-to-date with main and the queue is empty.

mergify bot added a commit that referenced this pull request Feb 8, 2024
@mergify mergify bot merged commit 2bb829b into main Feb 8, 2024
13 checks passed
@mergify mergify bot deleted the hasan/private-vpcs branch February 8, 2024 03:01
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.57.13.

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.

None yet

5 participants