feat(synthetics): add activeTracing, memory and timeout property to Canary class#30556
feat(synthetics): add activeTracing, memory and timeout property to Canary class#30556mergify[bot] merged 22 commits intoaws:mainfrom
Conversation
| !props.timeout) { | ||
| return undefined; | ||
| } | ||
| const activeTracingNotSupportedRuntime = [ |
There was a problem hiding this comment.
The error messages are taken directly from the documentation.
However, since syn-nodejs-2.0 and earlier versions are no longer available, I am only setting it for the currently available runtimes that do not support active tracing (see also docs).
I was unsure about including this validation, so if you have any thoughts or feedback, please let me know.
There was a problem hiding this comment.
What about checking props.runtime.family !== RuntimeFamily.NODEJS like in the other PR?
There was a problem hiding this comment.
Thank you. I made the correction since checking the runtime is better.
(Even though I did it myself in another PR...lol)
1a13629 to
e3d9b92
Compare
e3d9b92 to
a40be25
Compare
af745ad to
18d4100
Compare
lpizzinidev
left a comment
There was a problem hiding this comment.
Thanks 👍 Left some comments for adjustments
| * The maximum amount of memory that the canary can use while running. | ||
| * This value must be a multiple of 64 Mib. | ||
| * | ||
| * @default Size.mebibytes(5) |
There was a problem hiding this comment.
Are you sure about this default? 🤔
There was a problem hiding this comment.
Thank you. I made the correction since 1024MB is the default.
| !props.timeout) { | ||
| return undefined; | ||
| } | ||
| const activeTracingNotSupportedRuntime = [ |
There was a problem hiding this comment.
What about checking props.runtime.family !== RuntimeFamily.NODEJS like in the other PR?
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
6ec1bdc to
ae0b174
Compare
|
@lpizzinidev |
|
@mazyu36 Thanks for the changes 👍 Answered https://github.com/aws/aws-cdk/pull/30556/files#r1643336431 |
c2badc8 to
16e9e26
Compare
|
@lpizzinidev |
16e9e26 to
9d08774
Compare
|
|
||
| // Only check runtime family is nodejs because versions prior to syn-nodejs-2.0 are deprecated and can no longer be configured. | ||
| if (props.activeTracing && !cdk.Token.isUnresolved(props.runtime.family) && props.runtime.family !== RuntimeFamily.NODEJS) { | ||
| throw new Error('You can enable active tracing only for canaries that use version `syn-nodejs-2.0` or later for their canary runtime.'); |
There was a problem hiding this comment.
| throw new Error('You can enable active tracing only for canaries that use version `syn-nodejs-2.0` or later for their canary runtime.'); | |
| throw new Error('You can only enable active tracing for canaries that use canary runtime version `syn-nodejs-2.0` or later.'); |
There was a problem hiding this comment.
@paulhcsun
Thanks.
I've updated error message and unit tests.
|
@Mergifyio update |
☑️ Nothing to doDetails
|
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #9300, #14086, #28152
Reason for this change
In order to make the properties in the runConfig of the L1 Construct configurable in the L2 Construct.
At the moment, the L2 Canary Class only supports environmentVariables in the
runConfig.Description of changes
Add missing properties.
activeTracingmemorytimeoutNote: The following is stated in #9300, but when tested, it was possible to set only
memoryInMb(memory).Test code is here.
Description of how you validated changes
Add unit tests and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license