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

chore(synthetics): add nodejs puppeteer 8 runtime #30851

Merged
merged 4 commits into from
Jul 18, 2024

Conversation

mazyu36
Copy link
Contributor

@mazyu36 mazyu36 commented Jul 15, 2024

Issue # (if applicable)

Closes #30850.

Reason for this change

Add new runtime

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-8.0

Description of changes

Add new runtime

Description of how you validated changes

No test added because just add runtime enum.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team July 15, 2024 01:07
@github-actions github-actions bot added feature-request A feature should be added or improved. p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK labels Jul 15, 2024
@mazyu36 mazyu36 force-pushed the synthetics-node-puppeteer8 branch from a1b3776 to 94c349c Compare July 15, 2024 01:12
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jul 15, 2024
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-8.0
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_8_0 = new Runtime('syn-nodejs-puppeteer-8.0', RuntimeFamily.NODEJS);
Copy link
Contributor

Choose a reason for hiding this comment

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

will it not be better to have test(s) which utilise this enum for successful synthesis?
(note: not sure if it is possible to add such a test)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ChakshuGupta13
Thanks.
I've added a unit test and an integ test to verify deploying new runtime Canary.

* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-6.1
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-6.2
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this change, although necessary, may get hidden in history because it is being done with addition of Node.js puppeteer 8 runtime, hence, is it possible to take this separately (if not much effort required)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ChakshuGupta13
Thanks.
I've separated a PR #30853 to fix wrong link.

import * as cdk from 'aws-cdk-lib/core';
import { Canary, Cleanup, Code, Runtime, Schedule, Test } from 'aws-cdk-lib/aws-synthetics';
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
const app = new cdk.App();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: an empty line between imports and logic will be better?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I've added.

mergify bot pushed a commit that referenced this pull request Jul 16, 2024
Fix wrong link in syn-nodejs-puppeteer 6.2.

I discovered this while working on #30851.
I was [advised](#30851 (comment)) to separate the PRs, so I'm creating this as a new PR.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link
Contributor

@scanlonp scanlonp left a comment

Choose a reason for hiding this comment

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

This looks great! Couple comments on organization.

  1. I appreciate the integ test, but I think we can roll it into the integ.canary.ts test. I do not think we need a full new test just for this runtime.
  2. On the unit test, I see the only version of puppeteer we use is 3.8 (which is long deprecated). Instead of the single new test, what happens if we update all the versions to 8.0. With any luck, everything works without hiccups! If not, we can reconsider.

@scanlonp scanlonp self-assigned this Jul 16, 2024
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jul 16, 2024
@mazyu36 mazyu36 force-pushed the synthetics-node-puppeteer8 branch from 44a337a to 6db5212 Compare July 17, 2024 11:22
@mergify mergify bot dismissed scanlonp’s stale review July 17, 2024 11:22

Pull request has been modified.

@mazyu36
Copy link
Contributor Author

mazyu36 commented Jul 17, 2024

@scanlonp
Thank you for your review. I agree that your suggestions are better, so I have made the modifications.

  1. Added new runtime test to integ.canary.ts.
  2. Modified the runtime of existing unit tests.

@mazyu36 mazyu36 requested a review from scanlonp July 17, 2024 11:54
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jul 17, 2024
Copy link
Contributor

@scanlonp scanlonp left a comment

Choose a reason for hiding this comment

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

Nice work! Thanks for adding this in @mazyu36!

Copy link
Contributor

mergify bot commented Jul 17, 2024

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-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jul 17, 2024
Copy link
Contributor

mergify bot commented Jul 17, 2024

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

@lbadger
Copy link

lbadger commented Jul 17, 2024

Nice I was waiting for this!

@mazyu36
Copy link
Contributor Author

mazyu36 commented Jul 17, 2024

@scanlonp
Thank you for the approval!
However, it seems that the merge process is being blocked by aws/aws-cdk-owners. I don't understand the reason for the block...
Do you know how I can resolve this?​​​​​​​​​​​​​​​​

IMGq_3322

@scanlonp
Copy link
Contributor

Hey @mazyu36, that's saying we need 2 approvals for merge. It's a new process we are trying out. I'll see if I can get someone else to take a look at this and approve.

I would not worry too much about it for now. Our next release will be next week, and I'll make sure this is in by then!

@mazyu36
Copy link
Contributor Author

mazyu36 commented Jul 18, 2024

@scanlonp
Thank you for the explanation! I understand.
I'm looking forward to seeing the process move forward!​​​​​​​​​​​​​​​​

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 0f4cac7
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit bbf1ad4 into aws:main Jul 18, 2024
9 checks passed
Copy link
Contributor

mergify bot commented Jul 18, 2024

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

@mazyu36 mazyu36 deleted the synthetics-node-puppeteer8 branch July 18, 2024 23:04
@aws-cdk-automation
Copy link
Collaborator

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request A feature should be added or improved. p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-synthetics: support syn-nodejs-puppeteer-8.0 runtime
5 participants