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): add Map.tryGet(), Map.get() throws on key not found #3771

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
b18952f
feat(sdk): add `Map.tryGet()`, `Map.get()` throws on key not found
giovanni-orciuolo Aug 10, 2023
ee98aa3
fix(compiler): cannot reuse class names across multiple files (#3743)
Chriscbr Aug 10, 2023
38ae38e
feat(sdk): `MutMap.get()` macro mimics `Map.get()` macro
giovanni-orciuolo Aug 10, 2023
c1836ab
feat(sdk): add happy path test for `Map.tryGet()`
giovanni-orciuolo Aug 10, 2023
654124c
use `in` instead of `??` to check for value presence
giovanni-orciuolo Aug 10, 2023
a1a8d0f
use in instead of ?? to check for value presence (`MutMap`)
giovanni-orciuolo Aug 10, 2023
8df5d0e
feat(console): distinguish between user-named resources and compiler-…
polamoros Aug 10, 2023
e97e3bb
fix: hangar snapshots have machine-dependent output (#3777)
Chriscbr Aug 10, 2023
42a1eb7
fix(sdk): fix `cloud.website` not deploying s3 objects changes for `t…
garysassano Aug 11, 2023
f416d4b
feat(sdk): changing the bind method from internal to public (#3776)
marciocadev Aug 11, 2023
d9c841f
return with braces in macro
giovanni-orciuolo Aug 11, 2023
8b517b8
fix(sdk): custom bind method on awscdk targets (#3769)
marciocadev Aug 11, 2023
546663d
chore: change company name in CLA (#3786)
eladb Aug 11, 2023
9399564
feat(sdk)!: remove cloud.Queue initialMessages (#3780)
Chriscbr Aug 11, 2023
a930aa4
feat(compiler): support json to struct conversion (#3648)
hasanaburayyan Aug 12, 2023
024225b
fix(sdk): fixing `api.url` token inconsistency (#3772)
tsuf239 Aug 13, 2023
fc4e195
fix(compiler): remove some dead capturing code (#3799)
yoav-steinberg Aug 14, 2023
0139181
chore(sdk): adding auto retry to the sdk gh workflow (#3770)
tsuf239 Aug 14, 2023
2d662e6
chore(docs): added “distributed” to the counter title (#3633)
RoniWDS Aug 14, 2023
cb01b06
revert(docs): added “distributed” to the counter title (#3809)
hasanaburayyan Aug 14, 2023
1c9954e
fix(sdk): fix website source_hash (#3807)
tsuf239 Aug 14, 2023
45970cc
fix(sdk): kill all redis zombies (#3806)
tsuf239 Aug 15, 2023
ecb5bc8
fix(sdk): changing redis empty value to be nil (#3810)
tsuf239 Aug 15, 2023
207a338
feat(sdk): `queue.push()` can now handle invalid messages for aws tar…
garysassano Aug 15, 2023
2270700
fix: unable to lift maps with keys that require quotes (#3825)
MarkMcCulloh Aug 15, 2023
ef8b1e4
chore(docs): title changes in tools section (#3758)
hasanaburayyan Aug 15, 2023
71b9b5d
chore(docs): finish changing titles to use vs. docs (#3756)
hasanaburayyan Aug 15, 2023
cff291a
feat(sdk): adding OnDeploy to awscdk target (#3817)
marciocadev Aug 15, 2023
672baf4
chore: sanitize awscdk snapshot tests and cleanup cdktf snapshots (#3…
MarkMcCulloh Aug 15, 2023
41bece0
chore(repo): add missing volta config sections (#3813)
MarkMcCulloh Aug 16, 2023
7189db8
chore(docs): renaming monada to wing cloud (#3674)
garysassano Aug 16, 2023
3a82aa6
chore(sdk): refactor connections API (#3814)
Chriscbr Aug 16, 2023
ec5f4ce
fix(docs): wing filename in comparison pages (#3843)
yoavbls Aug 16, 2023
34f3175
feat(console): sync console theme color with the vs code theme (#3805)
polamoros Aug 17, 2023
d980a25
feat(sdk): adding set() method to mutarray (#3838)
WeepingClown13 Aug 17, 2023
37f65dc
chore(sdk): update `queue.push()` to use variadic parameter for messa…
garysassano Aug 17, 2023
7c9bfe4
feat(compiler): adding reassignable to if let (if let var) (#3840)
marciocadev Aug 17, 2023
08b5045
chore(sdk): add trace waiting utilities for sdk sim tests (#3869)
MarkMcCulloh Aug 17, 2023
6231d27
chore(repo): ensure certain sdk docs cannot be merged without running…
MarkMcCulloh Aug 17, 2023
02c5969
feat(compiler): structural typing for known json objects (#3729)
MarkMcCulloh Aug 17, 2023
400552f
chore(repo): typo in mergify queue message (#3876)
MarkMcCulloh Aug 18, 2023
f30b02c
fix(compiler): != deep inequality (#3868)
marciocadev Aug 18, 2023
c3aab87
chore(sdk): queue batch test can't use snapshots because execution or…
MarkMcCulloh Aug 18, 2023
27c6046
chore(sdk): update `queue.pop()` sdk test (#3875)
garysassano Aug 18, 2023
31c52b9
fix(compiler): unable to create array of valid heterogeneous values (…
MarkMcCulloh Aug 18, 2023
72cbd81
chore(docs): add push batch to `cloud.queue` example in the docs (#3…
garysassano Aug 19, 2023
ab723fa
feat(console): improve vs-code theme sync (#3865)
polamoros Aug 20, 2023
977fa9e
fix(sdk): website has no url protocol on tf-aws (#3757)
tsuf239 Aug 20, 2023
19ef86c
chore(docs): update language ref with `if let var` (#3896)
staycoolcall911 Aug 20, 2023
02bd260
fix: do not use ternary expression to throw
giovanni-orciuolo Aug 21, 2023
9c6833a
fix: mirror last commit for Map
giovanni-orciuolo Aug 21, 2023
02e2056
feat(sdk): add `mutarray.insert()` to std library (#3887)
garysassano Aug 21, 2023
1fa4e97
fix(sdk): fix race condition in `bucket.tryget()` and `bucket.trygetj…
garysassano Aug 21, 2023
ba6730e
feat(sdk): `addfile()` is a preflight method which adds file from abs…
0018akhil Aug 21, 2023
5f56442
fix(sdk): turn `indent` option of `json.stringify` into keyword argum…
garysassano Aug 22, 2023
6a0ebfb
fix(console): capture keydown events to handle clipboard actions insi…
polamoros Aug 23, 2023
b547c18
chore(repo): turbo caching improvements and minor packaging simplific…
MarkMcCulloh Aug 23, 2023
29adc4f
fix(sdk): remove unnecessary s3 bucket policy (#3926)
garysassano Aug 23, 2023
f6a363a
fix(sdk): json to struct error message missing dash (#3924)
hasanaburayyan Aug 23, 2023
116ee64
chore(repo): ensure self mutation updates branch as well (#3922)
MarkMcCulloh Aug 23, 2023
19d8565
feat(console): improve console design (#3934)
polamoros Aug 23, 2023
fb3f024
fix(compiler): comparison between mutable and immutable objects (#3870)
marciocadev Aug 23, 2023
3dae8c4
chore(repo): pr title linter must run on synchronize (#3937)
MarkMcCulloh Aug 23, 2023
2cd4959
chore(repo): switch back to single quotes for pnpm lockfile (#3939)
MarkMcCulloh Aug 23, 2023
8761776
fix: publish job not publishing all npm packages (#3947)
WeepingClown13 Aug 24, 2023
9c6fa1d
fix: publish job doesn't include winglang package (#3948)
WeepingClown13 Aug 24, 2023
d5e69bf
feat(console): remove rounded corners for playground and learn sites …
polamoros Aug 24, 2023
f0480cd
feat(console): remove theme toggle for playground (#3952)
polamoros Aug 24, 2023
bd45fd5
fix(compiler): cant call fromJson on imported structs (#3944)
hasanaburayyan Aug 24, 2023
3d7de7b
chore(repo): ensure the self mutation updater actual does a real merg…
MarkMcCulloh Aug 24, 2023
01a08af
chore(compiler)!: remove panic built-in method (#3950)
staycoolcall911 Aug 24, 2023
1184705
fix(compiler): error when more than one space is placed between `if` …
marciocadev Aug 24, 2023
8efecc2
feat(sdk)!: std.Node (#3884)
Chriscbr Aug 24, 2023
dd9055c
feat(sdk): use arm64 for `awscdk` and `tf-aws` functions (#3963)
Chriscbr Aug 25, 2023
d4ae09d
feat(compiler): elif let statement (#3888)
marciocadev Aug 25, 2023
554920d
fix(sdk): missing sourceModule info (#3968)
Chriscbr Aug 25, 2023
2b2aa81
chore(compiler): make preflight.js more self-contained (#3972)
Chriscbr Aug 25, 2023
2c27b86
fix(sdk): defer hash calculation of api spec to terraform (#3974)
skorfmann Aug 26, 2023
5d5d46e
fix(compiler): capture and lifting cleanups and fixes (#3899)
yoav-steinberg Aug 27, 2023
cec0997
feat(console): improve console loading ux (#3964)
polamoros Aug 28, 2023
3b73b1f
fix(sdk): connections are kept alive in api/website simulator (#3986)
MarkMcCulloh Aug 28, 2023
353b660
fix(compiler): missing extended struct fields for some imported JSII …
MarkMcCulloh Aug 28, 2023
881653e
fix(sdk): align 404 status across cloud.Api targets (#3973)
skorfmann Aug 29, 2023
7723b06
feat(compiler)!: `throw` becomes a keyword (#4008)
Chriscbr Aug 29, 2023
915f263
chore(compiler): store paths with Utf8PathBuf (#4009)
Chriscbr Aug 30, 2023
27aa725
chore(console): console preview environment (#3891)
eladcon Aug 30, 2023
bfbd81d
chore(repo): skip hangar when not needed (#3791)
MarkMcCulloh Aug 30, 2023
3721e51
chore(repo): skip console preview if not needed (#4016)
MarkMcCulloh Aug 30, 2023
95d0396
feat(sdk): add `MutArray.popAt()` and `MutArray.removeFirst()` to std…
garysassano Aug 30, 2023
babdb53
chore(repo): quality gate must run even if e2e tests are skipped (#4019)
MarkMcCulloh Aug 30, 2023
87edd50
chore(repo): quality gate must fail if preceding jobs fail (#4023)
MarkMcCulloh Aug 30, 2023
60ae422
feat(docs): add note about variable mutability (#4024)
wzslr321 Aug 30, 2023
33165cf
fix(docs): broken link in strings section (#4028)
Chriscbr Aug 31, 2023
8cad1fa
feat(sdk): regex.match (#4039)
harsh9607 Aug 31, 2023
ca6d5be
fix(compiler)!: non-static extern methods are not supported (#4027)
Chriscbr Aug 31, 2023
0858dd8
chore(build): no need to generate tree-sitter wasm as part of build (…
MarkMcCulloh Sep 1, 2023
7f28718
fix(compiler): string interpolation of Json is inconsistent (#4044)
Chriscbr Sep 1, 2023
f123739
fix(sdk): unable to use path variables in cloud.Api (#3931)
0018akhil Sep 3, 2023
8e8771f
fix(sdk): fixing api tests (#4050)
tsuf239 Sep 3, 2023
8efa0bb
fix(docs): broken links fixed (#4054)
itssubhodiproy Sep 3, 2023
cd3651f
fix(sdk)!: change Json.get() and Json.getAt() to throw (#4034)
garysassano Sep 3, 2023
6dbb1ac
chore(docs): remove double word from tests heading (#4063)
Lancear Sep 3, 2023
e906d6d
fix(test): `assertThrows` block not return a value in test
giovanni-orciuolo Sep 4, 2023
a6e4130
chore(sdk): improve bucket tests readability with `assertThrows` (#3900)
garysassano Sep 4, 2023
a621c1c
chore(docs): update polycons RFC disclaimer (#4076)
Chriscbr Sep 5, 2023
2b6d976
chore(build): pnpm update and audit (#4045)
MarkMcCulloh Sep 5, 2023
8fc4006
feat(console): improve jump to error when runing in vscode (#4012)
polamoros Sep 5, 2023
5b7c71c
feat(console): preserve state inside resource interaction views (#3981)
polamoros Sep 5, 2023
f8ebba7
chore: dependabot fix for vscode (#4081)
MarkMcCulloh Sep 5, 2023
bed2384
chore(repo): ensure publish runs even when certain processes are skip…
MarkMcCulloh Sep 5, 2023
f1446e7
feat(compiler): addition and subtraction assignment operators impleme…
wzslr321 Sep 5, 2023
52b44ca
feat(docs): add variadic params to jsii docgen (#4007)
tsuf239 Sep 6, 2023
17208d5
feat(sdk): cors support for api resource (#2904)
skorfmann Sep 6, 2023
b9d8eec
chore(repo): add VS Code workspace file (#3929)
skorfmann Sep 6, 2023
6344bc0
chore(repo): revert add VS Code workspace file 3929 (#4100)
staycoolcall911 Sep 6, 2023
13082be
fix(sdk): removing aws-sdk v3 from bundling (#4109)
marciocadev Sep 6, 2023
c0b77ca
feat(console): open error links using the active code editor (#4084)
polamoros Sep 7, 2023
ba00a84
chore(cli): show global options in wing cli (#4025)
garysassano Sep 7, 2023
442df9a
chore: pin node to 20.5.1 in ci (#4115)
MarkMcCulloh Sep 7, 2023
2cc25e2
fix(sdk): cloud.Service hangs on long-running inflight functions (#4089)
Chriscbr Sep 7, 2023
703ee66
chore(docs): disable turbo cache with `--force` (#4112)
staycoolcall911 Sep 7, 2023
eaba03a
feat(sdk): only generate test-running resources on clouds when runnin…
Chriscbr Sep 7, 2023
a8e0ecb
fix(compiler): cannot use fromJson on jsii imported struct (#4040)
hasanaburayyan Sep 8, 2023
28391e8
chore(docs): update json examples (#4120)
hasanaburayyan Sep 8, 2023
6fcfe7d
chore(sdk): remove unnecessary `cloud.Bucket` encryption config for a…
garysassano Sep 9, 2023
13e84fd
chore(docs): add missing example for `cloud.Counter` (#4051)
garysassano Sep 11, 2023
1ac7acf
chore(sdk): add `Queue.push` in sdk tests (#3886)
garysassano Sep 11, 2023
081d133
fix(docs): fix typo in compatibility matrix (#4093)
garysassano Sep 11, 2023
1dff110
chore(sdk): add `Json.entries()` (#4092)
garysassano Sep 11, 2023
d5f4ffc
feat(sdk): add `ex.Table.upsert()` (#4064)
garysassano Sep 11, 2023
0be5495
fix(build): missing files @winglang/sdk - cannot find module (#4088)
wzslr321 Sep 11, 2023
d0b321c
fix: ensure wing process is killed from vscode (#4124)
MarkMcCulloh Sep 11, 2023
466955f
feat(vscode): automatically reload extension features when updating w…
MarkMcCulloh Sep 11, 2023
ae05fc7
fix(sdk): bundling aws-sdk v3 again (#4152)
marciocadev Sep 12, 2023
fc38bbc
chore(build): gitignore non-deterministic json files from `cdktf get`…
MarkMcCulloh Sep 12, 2023
3aec56f
feat(sdk): change ex.table.get() method and create ex.table.tryGet() …
wzslr321 Sep 12, 2023
d634827
chore(build): re-delete cdktf version json (#4160)
MarkMcCulloh Sep 12, 2023
899ebde
fix(sdk): fixing table methods (#4163)
tsuf239 Sep 13, 2023
a315139
feat(compiler)!: separate module files and entrypoint files (#4149)
Chriscbr Sep 13, 2023
d280fb3
feat(console): optional express app for server (#4148)
eladcon Sep 13, 2023
6f8ab13
fix(console): jsx not compiled correctly for dependencies (#4146)
eladcon Sep 13, 2023
dfea1a5
fix: canary cannot find updated files (#4170)
Chriscbr Sep 13, 2023
f04de6b
chore(cli): add `--no-color` option (#4162)
garysassano Sep 13, 2023
e500574
fix(console): tests are causing ci timeouts (#4154)
polamoros Sep 14, 2023
947c97a
chore(repo): add VS Code workspace file (take 2) (#4107)
skorfmann Sep 14, 2023
eb9f00f
fix(sdk): cloud.Queue is not FIFO by default (#4173)
Chriscbr Sep 14, 2023
7bedd9a
fix(compiler): blocks can't start on a newline (#4182)
MarkMcCulloh Sep 14, 2023
3083cc1
feat(compiler): allow map to be valid json (#4186)
MarkMcCulloh Sep 14, 2023
3f09a3e
feat(compiler): access modifiers (#4133)
yoav-steinberg Sep 15, 2023
430ec75
fix(sdk)!: change addPolicyStatements to take variadic parameter (#4190)
Chriscbr Sep 15, 2023
e505e47
fix: crash when root file isn't able to be `stat`ed (#4198)
MarkMcCulloh Sep 18, 2023
037fb0e
chore: delete old logo directory (#4204)
amielpb Sep 18, 2023
26bc6ad
chore(repo): tell turbo to watch tsx files (#4208)
MarkMcCulloh Sep 18, 2023
b71cae1
fix: flakey installation step in canary workflow (#4209)
Chriscbr Sep 18, 2023
3db16c1
fix(sdk): cherrypick default az for wing app (#4151)
garysassano Sep 19, 2023
ed33433
fix(vscode): default `wing.bin` fails if there is a wing file/dir in …
MarkMcCulloh Sep 19, 2023
7b8d8b3
fix(console): missing brackets in console BSOD (#4215)
MarkMcCulloh Sep 19, 2023
3ccdc20
fix(sdk): can't use dots in API URL parts (#4213)
skyrpex Sep 19, 2023
5296f94
chore(vscode): highlight `pub` keyword (#4222)
staycoolcall911 Sep 20, 2023
2b2fb52
chore(sdk): add Max-Age CORS header for `cloud.Api` (#4194)
garysassano Sep 20, 2023
6834eb2
feat(sdk): dynamodb table resource (#4062)
eladcon Sep 20, 2023
9fd1fe9
fix: unable to run dynamodb tests on non linux CI (#4225)
eladcon Sep 20, 2023
1d44e45
feat(console): add icon to the Secret resource (#4230)
skyrpex Sep 20, 2023
c1e7360
chore(docs): add math, regex modules to the docs (#4227)
staycoolcall911 Sep 20, 2023
24114df
chore: idempotent npm release and fix for git tag determination (#4232)
MarkMcCulloh Sep 20, 2023
162d0e8
chore: publish script fix (#4236)
MarkMcCulloh Sep 20, 2023
030bffc
fix(sdk): cloud service on stop function title (#4235)
ainvoner Sep 21, 2023
e4d0254
chore(sdk): rename testing to simulator (#4231)
skorfmann Sep 21, 2023
220f197
chore(compiler): add support for `.test.w` entrypoints (#4249)
garysassano Sep 21, 2023
0316314
fix(compiler): unable to use phase-independent types from jsii (#4176)
MarkMcCulloh Sep 22, 2023
eee94aa
feat(sdk)!: improve dynamodb table resource (#4242)
skyrpex Sep 22, 2023
f676dad
fix(sdk)!: change Json.entries() to return Array<JsonEntry> (#4255)
hasanaburayyan Sep 22, 2023
aa5ca2f
fix: automatically semicolon incorrectly inserted into `as` and `in` …
MarkMcCulloh Sep 22, 2023
1e2e3d1
fix(console): panels gap color with custom theme (#4264)
polamoros Sep 22, 2023
e8781fe
chore(sdk): removing unnecessary comments (#4268)
marciocadev Sep 22, 2023
cd90a2e
fix(compiler): implicit structs don't work in collections (#4199)
MarkMcCulloh Sep 22, 2023
f817ea1
feat(sdk): adding cloud.Website to awscdk (#4267)
marciocadev Sep 24, 2023
1d7cd08
chore(sdk): change tests extension from `.main.w` to `.test.w` (#4256)
garysassano Sep 25, 2023
f8ec82d
chore: update canary test file and delete stale snapshots (#4275)
MarkMcCulloh Sep 25, 2023
60c61fd
feat(sdk): cloud.Function for target tf-gcp (#4197)
itssubhodiproy Sep 25, 2023
40bfe63
fix(sdk): `cloud.Service` doesn't wait for `onStart()` (#4253)
eladb Sep 26, 2023
5f48f1b
rfc: wing cloud preview environments (#3696)
ainvoner Sep 26, 2023
9be4c9d
feat(sdk): added publicUrl for tf-azure target (#4155)
itssubhodiproy Sep 26, 2023
6a18060
fix(sdk): retentionPeriod doesn't work for Queue in target sim (#4273)
gcfbn Sep 26, 2023
380c161
fix(sdk): better error message on unsupported compile target (#4282)
exoego Sep 26, 2023
d6fb4d0
feat(repo): running the sdk tests on main build (#4245)
tsuf239 Sep 27, 2023
3a84b1c
chore: queue retention time in spec test is too short (#4287)
MarkMcCulloh Sep 27, 2023
5297fe2
chore: only run aws sdk tests if changes are relevant (#4306)
MarkMcCulloh Sep 27, 2023
6d29256
chore: ensure aws test failure blocks publish (#4307)
MarkMcCulloh Sep 27, 2023
6bb75fa
chore: add retry for npm publish (#4309)
MarkMcCulloh Sep 27, 2023
c0b8744
fix(vscode): hover doesn't work in inflight initializer (#4310)
MarkMcCulloh Sep 27, 2023
a1ed608
feat(compiler): bring directories (#4210)
Chriscbr Sep 27, 2023
955be0a
chore(docs): remove outdated references to polycons (#4312)
Chriscbr Sep 27, 2023
d37d83f
fix: docsite build error (#4316)
Chriscbr Sep 27, 2023
e9b6e53
chore: move preview environments rfc to contributing section (#4320)
eladb Sep 28, 2023
cf18fac
fix(sdk): queue client should reject empty string message (#4301)
exoego Sep 28, 2023
0c8625d
chore: improved benchmark reporting and gating (#4302)
MarkMcCulloh Sep 28, 2023
c6d50eb
fix(compiler): support struct fromJson in non-entry files (#4327)
hasanaburayyan Sep 28, 2023
fac3f72
fix(sdk): aws queue client does not delete popped messages (#4314)
flyingImer Sep 29, 2023
3860541
feat!: stateful `cloud.Service`s (#4299)
eladb Sep 29, 2023
0ff9bd0
chore(docs): minor reorg tweeks of contributor guide (#4340)
hasanaburayyan Sep 29, 2023
6a9ce9d
feat(compiler): support unsafe json parsing (#4334)
hasanaburayyan Sep 29, 2023
8cda22d
feat(cli): compile directories (#4342)
Chriscbr Sep 29, 2023
65124f1
revert(cli): compile directories (#4346)
MarkMcCulloh Sep 29, 2023
17b1df1
fix(cli): compile with DEBUG=1 shows wrong stack trace (#4344)
Chriscbr Sep 29, 2023
602c8e5
feat(cli): compile directories (#4348)
Chriscbr Sep 30, 2023
b684cfd
fix(sdk): fix `cloud.function` timeout to match 1m default (#4304)
tsuf239 Oct 1, 2023
428f625
chore(docs): remove alpha references (#4123)
garysassano Oct 1, 2023
bb4eea5
chore(repo): ready for implementation field in issue templates (#4349)
staycoolcall911 Oct 1, 2023
e4e8d8b
fix(sdk): fixing queue setconsumer cloud function timeout (#4355)
tsuf239 Oct 1, 2023
def4257
chore(repo): maintainers can run sdk spec tests on forks (#4322)
tsuf239 Oct 1, 2023
a572271
chore: fix permissions in spec workflow (#4362)
MarkMcCulloh Oct 1, 2023
17a9c2c
fix: add semicolon to test
giovanni-orciuolo Oct 2, 2023
926c3d4
feat(sdk): add `parseUrl()` and `formatUrl()` to `http` submodule (#4…
garysassano Oct 2, 2023
41fabd5
feat(sdk): adding std.Map tests (#4336)
WeepingClown13 Oct 2, 2023
3df70f9
chore(docs): add windows installation guide (#4217)
Lancear Oct 2, 2023
397d009
Merge branch 'feat/map-tryget'
giovanni-orciuolo Oct 2, 2023
adb3fe0
chore: self mutation (build.diff)
monadabot Oct 12, 2023
c0a22b2
chore: self mutation (e2e-1of2.diff)
monadabot Oct 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Enhancement 🚀
description: Suggest a new feature or other improvement
labels: ["✨ enhancement"]
labels: ["✨ enhancement","needs-discussion"]
body:
- type: markdown
attributes:
Expand Down Expand Up @@ -65,3 +65,6 @@ body:
<!-- Please keep this note for the community -->
* Please vote by adding a 👍 reaction to the issue to help us prioritize.
* If you are interested to work on this issue, please leave a comment.
* If this issue is labeled **needs-discussion**, it means the spec
has not been finalized yet. Please reach out on the #dev channel
in the [Wing Slack](https://t.winglang.io/slack).
216 changes: 128 additions & 88 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,24 @@ env:
RUST_VERSION: "1.67.1"
NODE_VERSION: "18.16.0"
PNPM_VERSION: "8.6.3"
CARGO_TERM_COLOR: always
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
IS_SAME_REPO_PR: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}

jobs:
build:
name: "Build"
timeout-minutes: 30
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
outputs:
version: ${{ fromJson(steps.changelog.outputs.data).newVersion }}
last-version: ${{ fromJson(steps.changelog.outputs.data).lastVersion }}
changelog: ${{ fromJson(steps.changelog.outputs.data).changelog }}
vscode-wing-changed: ${{ steps.git-diff-vscode-wing.outputs.diff }}

vscode-wing-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['vscode-wing#compile'].changes }}
console-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['@wingconsole/app#preview:fly'].changes }}
e2e-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['hangar#test'].changes }}
bench-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['hangar#bench'].changes }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -66,15 +68,26 @@ jobs:

- name: Setup Cargo Cache
uses: Swatinem/rust-cache@v2
with:
# Don't save cache here, to avoid thrashing with test job
save-if: false

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Derive appropriate SHAs for base and head
id: shas
uses: nrwl/nx-set-shas@v3

- name: Figure out what projects changed
id: turbo-diff
run: pnpm turbo-diff --startRef ${{ steps.shas.outputs.base }} --endRef ${{ steps.shas.outputs.head }}

- name: Changelog Generation
id: changelog
env:
GENERATE_VERSION: ${{ github.event_name != 'push' || github.repository != 'winglang/wing' }}
run: pnpm changelog
run: pnpm bump-pack

- name: Build and Package
run: pnpm package:ci
Expand All @@ -85,56 +98,15 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.tgz

- name: Upload WingC WASM
uses: actions/upload-artifact@v3
with:
name: wingc
path: libs/wingcompiler/wingc.wasm

- name: Derive appropriate SHAs for base and head
id: setSHAs
uses: nrwl/nx-set-shas@v3

- name: Check git diff of VSCode Extension
id: git-diff-vscode-wing
run: |
if git diff --quiet ${{ steps.setSHAs.outputs.base }} ${{ github.sha }} -- apps/vscode-wing; then
echo "diff=false" >> "$GITHUB_OUTPUT"
else
echo "diff=true" >> "$GITHUB_OUTPUT"
fi

- name: Upload Extension
uses: actions/upload-artifact@v3
with:
name: vscode-wing
path: apps/vscode-wing/vscode-wing.vsix

- name: Compress Docs
run: tar -czvf docs.tgz docs/*

- name: Upload Docs
uses: actions/upload-artifact@v3
with:
name: docs
path: docs.tgz
path: dist/*

test:
name: Test
timeout-minutes: 30
timeout-minutes: 60
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Setup pnpm
uses: pnpm/[email protected]
Expand Down Expand Up @@ -171,14 +143,7 @@ jobs:

- name: Create git patch
id: diff
run: |
git add --all
git diff --staged --binary --patch > build.diff
if [ -s build.diff ]; then
echo "Diff found, creating a patch to apply later"
cat build.diff
echo "diff=true" >> $GITHUB_OUTPUT
fi
run: scripts/create_patch.sh build.diff

- name: Upload patch
if: steps.diff.outputs.diff == 'true'
Expand All @@ -189,6 +154,7 @@ jobs:

benchmark:
name: Benchmark
if: needs.build.outputs.bench-changed == 'true' || contains(github.event.pull_request.labels.*.name, '🧪 pr/e2e-full')
runs-on: ubuntu-latest
needs:
- build
Expand Down Expand Up @@ -217,28 +183,32 @@ jobs:
run: pnpm install --ignore-scripts --frozen-lockfile --filter hangar --filter examples-valid --filter examples-invalid

- name: Run E2E Benchmarks
run: pnpm bench
env:
BENCH_FAIL_THRESHOLD_PERCENT: "50"
BENCH_COMPARE_PREVIOUS: "${{ github.event_name == 'pull_request' && 'main' || '' }}"
GITHUB_TOKEN: ${{ env.IS_SAME_REPO_PR == 'true' && secrets.PROJEN_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
BENCH_PR: "${{ env.IS_SAME_REPO_PR == 'true' && github.event.pull_request.number || '' }}"
working-directory: tools/hangar
run: pnpm bench

- name: Upload Report JSON
uses: actions/upload-artifact@v3
with:
name: benchmarks
path: tools/hangar/results/report.json

- name: Create Markdown report
run: node scripts/benchmark_json_to_table.mjs

e2e-test:
name: "E2E / ${{ matrix.runner }} + Node${{ matrix.node }} [${{ matrix.shard }}]"
runs-on: "${{ matrix.runner }}-latest"
needs:
- build
if: needs.build.outputs.e2e-changed == 'true' || contains(github.event.pull_request.labels.*.name, '🧪 pr/e2e-full')
strategy:
fail-fast: true
matrix:
runner: [windows, macos, ubuntu]
node: ["18", "20"]
# Pinned 20 to 20.5.1 until https://github.com/nodejs/node/issues/49497 is released
node: ["18", "20.5.1"]
shard: ["1/2", "2/2"]
full_run:
# Do a full run on push or when the PR is labeled "pr/e2e-full"
Expand All @@ -254,8 +224,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Setup pnpm
uses: pnpm/[email protected]
Expand Down Expand Up @@ -291,13 +259,7 @@ jobs:
RAW_SHARD: ${{ matrix.shard }}
run: |
SHARD=$(echo $RAW_SHARD | sed 's/\//of/g')
DIFF_NAME="e2e-$SHARD.diff"
git add --all
git diff --staged --binary --patch > $DIFF_NAME
if [ -s $DIFF_NAME ]; then
echo "diff=true" >> $GITHUB_OUTPUT
echo "diff_name=$DIFF_NAME" >> $GITHUB_OUTPUT
fi
scripts/create_patch.sh "e2e-$SHARD.diff"

- name: Upload mutation
if: matrix.runner == 'ubuntu' && matrix.node == '18' && steps.diff.outputs.diff == 'true'
Expand All @@ -306,15 +268,74 @@ jobs:
name: ${{ steps.diff.outputs.diff_name }}
path: ${{ steps.diff.outputs.diff_name }}

aws-sdk-spec-test:
needs:
- build
if: github.event_name == 'push' && needs.build.outputs.e2e-changed == 'true'
uses: ./.github/workflows/tf-aws-test.yml
secrets: inherit

console-preview:
name: "Console Preview"
runs-on: ubuntu-latest
needs:
- build
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
FLY_VERSION: "0.1.80"
APP_NAME: wing-console-pr-${{github.event.number}}
if: ${{ needs.build.outputs.console-changed == 'true' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'mergify/merge-queue/') }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download Dist Artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist

- name: Install flyctl
uses: superfly/flyctl-actions/[email protected]
with:
version: ${{ env.FLY_VERSION }}

- name: Deploy to Fly.io
id: deploy-fly
run: |
if ! flyctl status --app "$APP_NAME"; then
pushd ./apps/wing-console/console/app/preview
flyctl launch --no-deploy --copy-config --name "$APP_NAME" --image-label latest
popd
fi
flyctl deploy . --config ./apps/wing-console/console/app/preview/fly.toml --app "$APP_NAME" --image-label latest --vm-memory 512 --strategy immediate
flyctl scale count 1 --yes --app "$APP_NAME"
echo "deploytime=$(TZ=UTC date +'%Y-%m-%d %H:%M')" >> $GITHUB_OUTPUT

- name: Post preview comment
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Console preview environment is available at https://${{env.APP_NAME}}.fly.dev :rocket:

###### Last Updated (UTC) ${{steps.deploy-fly.outputs.deploytime }}
comment_tag: Console preview environment
GITHUB_TOKEN: ${{secrets.PROJEN_GITHUB_TOKEN}}

quality-gate:
name: Quality Gate
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
needs:
- build
- e2e-test
- benchmark
- test
- aws-sdk-spec-test
steps:
- name: Check failure
if: needs.build.result == 'failure' || needs.e2e-test.result == 'failure' || needs.benchmark.result == 'failure' || needs.test.result == 'failure' || needs.aws-sdk-spec-test.result == 'failure'
run: exit 1
- name: Download patches
uses: actions/download-artifact@v3
- name: Check patches
Expand All @@ -333,7 +354,7 @@ jobs:

publish:
name: Publish
if: ${{ github.event_name == 'push' && github.repository == 'winglang/wing' && github.ref == 'refs/heads/main' }}
if: ${{ !cancelled() && needs.quality-gate.result == 'success' && github.event_name == 'push' && github.repository == 'winglang/wing' && github.ref == 'refs/heads/main' }}
needs:
- quality-gate
- build
Expand All @@ -349,25 +370,43 @@ jobs:
repo-token: "${{ secrets.PROJEN_GITHUB_TOKEN }}"
tag: "v${{ needs.build.outputs.version }}"

- name: Login to NPM registry
run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Publish NPM packages
uses: nick-fields/retry@v2
env:
PACKAGE_VERSION: ${{ needs.build.outputs.version }}
with:
max_attempts: 7
retry_on: error
timeout_minutes: 5
command: |
cd dist
PACKAGES=("@winglang/sdk" "@winglang/compiler" "@wingconsole/design-system" "@wingconsole/ui" "@wingconsole/server" "@wingconsole/app" "winglang")
for PACKAGE in "${PACKAGES[@]}"; do
# Check if already published
VERSION_FOUND=$(npm view "$PACKAGE@$PACKAGE_VERSION" version --verbose || true)
if [ "$VERSION_FOUND" = "$PACKAGE_VERSION" ]; then
echo "$PACKAGE@$PACKAGE_VERSION already published, skipping"
continue
fi

# remove "@" and replace "/" with "-"
TARBALL=$(echo "$PACKAGE-$PACKAGE_VERSION.tgz" | sed 's/@//g' | sed 's/\//-/g')

npm publish "$TARBALL" --access public --verbose
done

- name: Publish Extension to Visual Studio Marketplace
if: needs.build.outputs.vscode-wing-changed == 'true'
uses: "HaaLeo/publish-vscode-extension@v1"
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: "https://marketplace.visualstudio.com"
extensionFile: "vscode-wing/vscode-wing.vsix"
extensionFile: "dist/vscode-wing.vsix"
dependencies: false

- name: Login to NPM registry
run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Publish npm packages
run: |
for file in *.tgz; do
npm publish "$file" --access public
done
working-directory: dist

- name: Write Changelog
uses: DamianReeves/[email protected]
with:
Expand All @@ -377,10 +416,11 @@ jobs:

- name: Compute Checksums
run: |
mv ./docs/*.tgz ./dist
mv ./*/*.vsix ./dist
mv ./*/*.wasm ./dist
mv ./benchmarks/* ./dist
# if there is a ./benchmarks/report.json, move it to ./dist
if [ -f ./benchmarks/report.json ]; then
mv ./benchmarks/report.json ./dist
fi

cd dist

echo '' >> ../CHANGELOG.md
Expand Down
Loading