Skip to content

chore(cloudfront): remove the use of calculateFunctionHash - #14583

Merged
mergify[bot] merged 1 commit into
masterfrom
nija-at/cloudfront-fix-hack
May 7, 2021
Merged

mergify[bot] merged 1 commit into
masterfrom
nija-at/cloudfront-fix-hack

Conversation

@nija-at

@nija-at nija-at commented May 7, 2021

Copy link
Copy Markdown
Contributor

calculateFunctionHash() was used to compute the 'refresh token' of the
custom resource for the EdgeFunction construct.

This method is private to the lambda module and is deemed to be changed.
Instead, use the lambda function version's logical id.

The logical id of the version includes computing the function hash (among
others) and is a more reliable determinant of whether the underlying
function version changed.


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

`calculateFunctionHash()` was used to compute the 'refresh token' of the
custom resource for the EdgeFunction construct.

This method is private to the lambda module and is deemed to be changed.
Instead, use the lambda function version's logical id.

The logical id of the version is computed using the same mechanism and
is a more reliable determinant of whether the underlying function
version changed.
@nija-at
nija-at requested a review from njlynch May 7, 2021 13:31
@nija-at nija-at self-assigned this May 7, 2021
@gitpod-io

gitpod-io Bot commented May 7, 2021

Copy link
Copy Markdown

@github-actions github-actions Bot added the @aws-cdk/aws-cloudfront Related to Amazon CloudFront label May 7, 2021
@mergify mergify Bot added the contribution/core This is a PR that came from AWS. label May 7, 2021
@mergify
mergify Bot merged commit dd8466f into master May 7, 2021
@mergify
mergify Bot deleted the nija-at/cloudfront-fix-hack branch May 7, 2021 13:56
@mergify

mergify Bot commented May 7, 2021

Copy link
Copy Markdown
Contributor

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation

Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 58280ba
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

john-tipper pushed a commit to john-tipper/aws-cdk that referenced this pull request May 10, 2021
`calculateFunctionHash()` was used to compute the 'refresh token' of the
custom resource for the EdgeFunction construct.

This method is private to the lambda module and is deemed to be changed.
Instead, use the lambda function version's logical id.

The logical id of the version includes computing the function hash (among
others) and is a more reliable determinant of whether the underlying
function version changed.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
eladb pushed a commit that referenced this pull request May 11, 2021
* chore(cloudfront): remove the use of calculateFunctionHash (#14583)

`calculateFunctionHash()` was used to compute the 'refresh token' of the
custom resource for the EdgeFunction construct.

This method is private to the lambda module and is deemed to be changed.
Instead, use the lambda function version's logical id.

The logical id of the version includes computing the function hash (among
others) and is a more reliable determinant of whether the underlying
function version changed.


----

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

* feat(cloudwatch): validate parameters for a metric dimensions (closes #3116) (#14365)

As per #3116, the changes in this PR validate metric dimension values (length, and checking if the value is null or undefined) and throw errors if the values are not valid. I've also corrected a comment in the metric-types.ts to use the correct method name

* feat(appmesh): change HealthChecks to use protocol-specific union-like classes (#14432)

BREAKING CHANGE: HealthChecks require use of static factory methods

fixes #11640

----

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

Co-authored-by: Niranjan Jayakar <[email protected]>
Co-authored-by: OksanaH <[email protected]>
Co-authored-by: Dominic Fezzie <[email protected]>
Co-authored-by: Elad Ben-Israel <[email protected]>
eladb pushed a commit that referenced this pull request May 12, 2021
* chore(cloudfront): remove the use of calculateFunctionHash (#14583)

`calculateFunctionHash()` was used to compute the 'refresh token' of the
custom resource for the EdgeFunction construct.

This method is private to the lambda module and is deemed to be changed.
Instead, use the lambda function version's logical id.

The logical id of the version includes computing the function hash (among
others) and is a more reliable determinant of whether the underlying
function version changed.


----

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

* feat(cloudwatch): validate parameters for a metric dimensions (closes #3116) (#14365)

As per #3116, the changes in this PR validate metric dimension values (length, and checking if the value is null or undefined) and throw errors if the values are not valid. I've also corrected a comment in the metric-types.ts to use the correct method name

* feat(appmesh): change HealthChecks to use protocol-specific union-like classes (#14432)

BREAKING CHANGE: HealthChecks require use of static factory methods

fixes #11640

----

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

* feat(msk): Cluster L2 Construct (#9908)

L2 Construct for a MSK Cluster. 

I wrote this for internal use and thought I'd share it. I tried to follow the [example resource](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/example-construct-library/lib/example-resource.ts) and [design guidelines](https://github.com/aws/aws-cdk/blob/master/DESIGN_GUIDELINES.md) as much as I could. Default properties were chosen either based on defaults when creating a cluster in the console or defaults set from CloudFormation.

Closes #9603

----

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

* feat(kms): allow specifying key spec and key usage (#14478)

This allows specifying key spec and key usage, so you can create asymmetric keys.

closes #5639


----

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

* chore: add `@types/jest` to a package that was missing it (#14609)

----

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

* chore: issue template for bugs to have an SSCCE example (#14615)

Ask customers to provide reproducible code snippets
to reduce the amount of triage time required.

----

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

* fix(cli): synth fails if there was an error when synthesizing the stack (#14613)

All stacks created inside a pipeline stage will be flagged for validation. After synth is done, the CLI will validate all flagged stacks plus the stacks that were explicitly specified.

----

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

* chore: annotate `aws-lambda-go` with `docker` requirement (#14618)

The `nozem` build tool needs to know that `docker` is required to
build/test this particular package.


----

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

* feat(elbv2): preserveClientIp for NetworkTargetGroup (#14589)

Allows users to configure client IP preservation for network target groups.

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetgroupattribute.html

----

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

* chore: npm-check-updates && yarn upgrade (#14620)

Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.

* chore(mergify): add @BenChaimberg to team roster

* chore(release): 1.103.0

* chore: mark "otaviomacedo" as core contributor (#14619)

Co-authored-by: Otavio Macedo <[email protected]>

* chore(cli): add npm command to upgrade notice (#14621)

A colleague had to go look up the command to update the CDK CLI. It occurred to me that is probably common with developers who don't work with NPM on a daily basis, such as anyone who isn't developing in TypeScript or JavaScript.

Put the necessary command right in the upgrade notice.

----

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

* fix(lambda): custom resource fails to connect to efs filesystem (#14431)

Fixes: #14430

----

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

* feat(cfnspec): cloudformation spec v35.2.0 (#14610)

* feat: cloudformation spec v35.2.0

* add spec patches

Co-authored-by: AWS CDK Team <[email protected]>
Co-authored-by: Elad Ben-Israel <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* fix(lambda-nodejs): handler filename missing from error message (#14564)


----

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

* chore(build): clarify prerequisites in CONTRIBUTING and verify before build (#14642)

The build script at the top level of the repository performs a prerequisites check before beginning the build. This verification is not complete as it does not include the required checks for .NET and Python executables. Further, the prerequisites documentation in the contributing guide does not note the Docker requirement.

----

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

Co-authored-by: Niranjan Jayakar <[email protected]>
Co-authored-by: OksanaH <[email protected]>
Co-authored-by: Dominic Fezzie <[email protected]>
Co-authored-by: Curtis <[email protected]>
Co-authored-by: Shinya Tsuda <[email protected]>
Co-authored-by: Rico Huijbers <[email protected]>
Co-authored-by: Otavio Macedo <[email protected]>
Co-authored-by: Griffin Byatt <[email protected]>
Co-authored-by: Ben Chaimberg <[email protected]>
Co-authored-by: AWS CDK Team <[email protected]>
Co-authored-by: Mitchell Valine <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jerry Kindall <[email protected]>
Co-authored-by: Daniel Neilson <[email protected]>
Co-authored-by: Elad Ben-Israel <[email protected]>
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
`calculateFunctionHash()` was used to compute the 'refresh token' of the
custom resource for the EdgeFunction construct.

This method is private to the lambda module and is deemed to be changed.
Instead, use the lambda function version's logical id.

The logical id of the version includes computing the function hash (among
others) and is a more reliable determinant of whether the underlying
function version changed.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
ali-n4i pushed a commit to ali-n4i/aws-cdk that referenced this pull request Jul 29, 2026
`calculateFunctionHash()` was used to compute the 'refresh token' of the
custom resource for the EdgeFunction construct.

This method is private to the lambda module and is deemed to be changed.
Instead, use the lambda function version's logical id.

The logical id of the version includes computing the function hash (among
others) and is a more reliable determinant of whether the underlying
function version changed.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
ali-n4i pushed a commit to ali-n4i/aws-cdk that referenced this pull request Jul 29, 2026
* chore(cloudfront): remove the use of calculateFunctionHash (aws#14583)

`calculateFunctionHash()` was used to compute the 'refresh token' of the
custom resource for the EdgeFunction construct.

This method is private to the lambda module and is deemed to be changed.
Instead, use the lambda function version's logical id.

The logical id of the version includes computing the function hash (among
others) and is a more reliable determinant of whether the underlying
function version changed.


----

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

* feat(cloudwatch): validate parameters for a metric dimensions (closes aws#3116) (aws#14365)

As per aws#3116, the changes in this PR validate metric dimension values (length, and checking if the value is null or undefined) and throw errors if the values are not valid. I've also corrected a comment in the metric-types.ts to use the correct method name

* feat(appmesh): change HealthChecks to use protocol-specific union-like classes (aws#14432)

BREAKING CHANGE: HealthChecks require use of static factory methods

fixes aws#11640

----

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

Co-authored-by: Niranjan Jayakar <[email protected]>
Co-authored-by: OksanaH <[email protected]>
Co-authored-by: Dominic Fezzie <[email protected]>
Co-authored-by: Elad Ben-Israel <[email protected]>
ali-n4i pushed a commit to ali-n4i/aws-cdk that referenced this pull request Jul 29, 2026
* chore(cloudfront): remove the use of calculateFunctionHash (aws#14583)

`calculateFunctionHash()` was used to compute the 'refresh token' of the
custom resource for the EdgeFunction construct.

This method is private to the lambda module and is deemed to be changed.
Instead, use the lambda function version's logical id.

The logical id of the version includes computing the function hash (among
others) and is a more reliable determinant of whether the underlying
function version changed.


----

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

* feat(cloudwatch): validate parameters for a metric dimensions (closes aws#3116) (aws#14365)

As per aws#3116, the changes in this PR validate metric dimension values (length, and checking if the value is null or undefined) and throw errors if the values are not valid. I've also corrected a comment in the metric-types.ts to use the correct method name

* feat(appmesh): change HealthChecks to use protocol-specific union-like classes (aws#14432)

BREAKING CHANGE: HealthChecks require use of static factory methods

fixes aws#11640

----

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

* feat(msk): Cluster L2 Construct (aws#9908)

L2 Construct for a MSK Cluster. 

I wrote this for internal use and thought I'd share it. I tried to follow the [example resource](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/example-construct-library/lib/example-resource.ts) and [design guidelines](https://github.com/aws/aws-cdk/blob/master/DESIGN_GUIDELINES.md) as much as I could. Default properties were chosen either based on defaults when creating a cluster in the console or defaults set from CloudFormation.

Closes aws#9603

----

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

* feat(kms): allow specifying key spec and key usage (aws#14478)

This allows specifying key spec and key usage, so you can create asymmetric keys.

closes aws#5639


----

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

* chore: add `@types/jest` to a package that was missing it (aws#14609)

----

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

* chore: issue template for bugs to have an SSCCE example (aws#14615)

Ask customers to provide reproducible code snippets
to reduce the amount of triage time required.

----

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

* fix(cli): synth fails if there was an error when synthesizing the stack (aws#14613)

All stacks created inside a pipeline stage will be flagged for validation. After synth is done, the CLI will validate all flagged stacks plus the stacks that were explicitly specified.

----

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

* chore: annotate `aws-lambda-go` with `docker` requirement (aws#14618)

The `nozem` build tool needs to know that `docker` is required to
build/test this particular package.


----

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

* feat(elbv2): preserveClientIp for NetworkTargetGroup (aws#14589)

Allows users to configure client IP preservation for network target groups.

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetgroupattribute.html

----

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

* chore: npm-check-updates && yarn upgrade (aws#14620)

Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.

* chore(mergify): add @BenChaimberg to team roster

* chore(release): 1.103.0

* chore: mark "otaviomacedo" as core contributor (aws#14619)

Co-authored-by: Otavio Macedo <[email protected]>

* chore(cli): add npm command to upgrade notice (aws#14621)

A colleague had to go look up the command to update the CDK CLI. It occurred to me that is probably common with developers who don't work with NPM on a daily basis, such as anyone who isn't developing in TypeScript or JavaScript.

Put the necessary command right in the upgrade notice.

----

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

* fix(lambda): custom resource fails to connect to efs filesystem (aws#14431)

Fixes: aws#14430

----

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

* feat(cfnspec): cloudformation spec v35.2.0 (aws#14610)

* feat: cloudformation spec v35.2.0

* add spec patches

Co-authored-by: AWS CDK Team <[email protected]>
Co-authored-by: Elad Ben-Israel <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* fix(lambda-nodejs): handler filename missing from error message (aws#14564)


----

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

* chore(build): clarify prerequisites in CONTRIBUTING and verify before build (aws#14642)

The build script at the top level of the repository performs a prerequisites check before beginning the build. This verification is not complete as it does not include the required checks for .NET and Python executables. Further, the prerequisites documentation in the contributing guide does not note the Docker requirement.

----

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

Co-authored-by: Niranjan Jayakar <[email protected]>
Co-authored-by: OksanaH <[email protected]>
Co-authored-by: Dominic Fezzie <[email protected]>
Co-authored-by: Curtis <[email protected]>
Co-authored-by: Shinya Tsuda <[email protected]>
Co-authored-by: Rico Huijbers <[email protected]>
Co-authored-by: Otavio Macedo <[email protected]>
Co-authored-by: Griffin Byatt <[email protected]>
Co-authored-by: Ben Chaimberg <[email protected]>
Co-authored-by: AWS CDK Team <[email protected]>
Co-authored-by: Mitchell Valine <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jerry Kindall <[email protected]>
Co-authored-by: Daniel Neilson <[email protected]>
Co-authored-by: Elad Ben-Israel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@aws-cdk/aws-cloudfront Related to Amazon CloudFront contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants