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(synthetics): add support for puppeteer 3.4 runtime #19429

Merged
merged 8 commits into from Mar 18, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-synthetics/README.md
Expand Up @@ -129,7 +129,7 @@ new synthetics.Canary(this, 'Inline Canary', {
code: synthetics.Code.fromInline('/* Synthetics handler code */'),
handler: 'index.handler', // must be 'index.handler'
}),
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_3,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_4,
});

// To supply the code from your local filesystem:
Expand All @@ -138,7 +138,7 @@ new synthetics.Canary(this, 'Asset Canary', {
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
handler: 'index.handler', // must end with '.handler'
}),
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_3,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_4,
});

// To supply the code from a S3 bucket:
Expand All @@ -149,7 +149,7 @@ new synthetics.Canary(this, 'Bucket Canary', {
code: synthetics.Code.fromBucket(bucket, 'canary.zip'),
handler: 'index.handler', // must end with '.handler'
}),
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_3,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_4,
});
```

Expand Down Expand Up @@ -188,7 +188,7 @@ new synthetics.Canary(this, 'Vpc Canary', {
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
handler: 'index.handler',
}),
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_3,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_4,
vpc,
});
```
Expand Down
12 changes: 11 additions & 1 deletion packages/@aws-cdk/aws-synthetics/lib/runtime.ts
Expand Up @@ -114,6 +114,16 @@ export class Runtime {
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_3 = new Runtime('syn-nodejs-puppeteer-3.3', RuntimeFamily.NODEJS);

/**
* `syn-nodejs-puppeteer-3.4` includes the following:
* - Lambda runtime Node.js 12.x
* - Puppeteer-core version 5.5.0
* - Chromium version 88.0.4298.0
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.4
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_4 = new Runtime('syn-nodejs-puppeteer-3.4', RuntimeFamily.NODEJS);

/**
* `syn-python-selenium-1.0` includes the following:
* - Lambda runtime Python 3.8
Expand All @@ -130,4 +140,4 @@ export class Runtime {
*/
public constructor(public readonly name: string, public readonly family: RuntimeFamily) {
}
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-synthetics/test/canary.test.ts
Expand Up @@ -304,7 +304,7 @@ test('Schedule can be set with Cron', () => {
handler: 'index.handler',
code: synthetics.Code.fromInline('/* Synthetics handler code */'),
}),
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_3,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_4,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather not change this. Since we're not testing for runtime, it doesn't matter what we change in this field.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted in 24855a9.

});

// THEN
Expand Down