-
Notifications
You must be signed in to change notification settings - Fork 4k
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(synthetics): add activeTracing, memory and timeout property to Canary class #30556
Conversation
return undefined; | ||
} | ||
const activeTracingNotSupportedRuntime = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about checking props.runtime.family !== RuntimeFamily.NODEJS
like in the other PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure about this default? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I made the correction since 1024MB is the default.
return undefined; | ||
} | ||
const activeTracingNotSupportedRuntime = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @mazyu36! Thanks for the contribution!
Just have one minor wording change for the error message and I'd be happy to approve.
|
||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulhcsun
Thanks.
I've updated error message and unit tests.
@Mergifyio update |
☑️ Nothing to do
|
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.
activeTracing
memory
timeout
Note: 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