-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdk, compiler): displaying logs of tf-aws functions (#3622)
fixes: #1973 ## Description * Collecting and printing `log(...)` outputs when running a test on target tf-aws ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [ ] Tests added (always) - [x] 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](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
- Loading branch information
Showing
26 changed files
with
5,289 additions
and
4,582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
exports.logging = function () { | ||
console.log("hello world"); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
bring cloud; | ||
|
||
class Util { | ||
extern "./logging.js" static inflight logging(): void; | ||
} | ||
|
||
let f1 = new cloud.Function(inflight (input: str): void => { | ||
log("log inside f1"); | ||
}) as "f1"; | ||
|
||
let f2 = new cloud.Function(inflight (input: str): void => { | ||
f1.invoke(""); | ||
log("log inside f2"); | ||
f1.invoke(""); | ||
}) as "f2"; | ||
|
||
/** | ||
should log: | ||
|
||
hello world | ||
log inside f1 | ||
log inside f2 | ||
log inside f1 | ||
hello world | ||
log inside f1 | ||
log inside f2 | ||
log inside f1 | ||
*/ | ||
|
||
test "logging" { | ||
Util.logging(); | ||
f2.invoke(""); | ||
Util.logging(); | ||
f2.invoke(""); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,7 @@ const project = new cdk.JsiiProject({ | |
"@aws-sdk/[email protected]", | ||
"@aws-sdk/[email protected]", | ||
"@aws-sdk/[email protected]", | ||
"@types/aws-lambda", | ||
// the following 2 deps are required by @aws-sdk/util-utf8-node | ||
"@aws-sdk/[email protected]", | ||
"@aws-sdk/[email protected]", | ||
|
@@ -107,7 +108,6 @@ const project = new cdk.JsiiProject({ | |
`@cdktf/provider-aws@^15.0.0`, // only for testing Wing plugins | ||
"wing-api-checker@workspace:^", | ||
"bump-pack@workspace:^", | ||
"@types/aws-lambda", | ||
"@types/fs-extra", | ||
"@types/mime-types", | ||
"@types/express", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.