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(lambda-nodejs): prepare code to reduce merge conflicts when deprecated APIs are stripped #13738

Merged
merged 17 commits into from
Mar 24, 2021

Conversation

nija-at
Copy link
Contributor

@nija-at nija-at commented Mar 22, 2021

BUNDLING - The BundlingDockerImage class is deprecated,
replaced by DockerImage. Remove all uses of this class
across modules in a backwards compatible way.

ECR ASSET - Change the way symbols are imported from
'@aws-cdk/assets' so that they can be in-place replaced with
their replacements from '@aws-cdk/core' module.
The IAsset interface from the core module introduces the
property assetHash instead of sourceHash. This change
makes the code forwards compatible so as to be supportive
on v2.

Other small backwards compatible changes.

BREAKING CHANGE: The type of image property in the
Bundling class is changed from BundlingDockerImage to
DockerImage.

  • lambda-nodejs: The type of dockerImage property in
    BundlingOptions is changed from BundlingDockerImage to
    DockerImage.

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

@gitpod-io
Copy link

gitpod-io bot commented Mar 22, 2021

@nija-at nija-at self-assigned this Mar 22, 2021
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Mar 22, 2021
@nija-at nija-at changed the title chore: remove use of deprecated BundlingDockerImage chore(lambda-nodejs): remove use of deprecated BundlingDockerImage Mar 22, 2021
@nija-at nija-at requested review from eladb and a team March 22, 2021 17:22
@nija-at nija-at marked this pull request as ready for review March 22, 2021 17:22
@nija-at nija-at changed the title chore(lambda-nodejs): remove use of deprecated BundlingDockerImage chore(lambda-nodejs): remove usage of deprecated BundlingDockerImage Mar 22, 2021
@nija-at nija-at force-pushed the nija-at/bundling-deprecated branch from ce53fa0 to c3c831f Compare March 22, 2021 17:35
robertd and others added 10 commits March 23, 2021 10:28
…n CORS (#13313)

API gateway expects `*` to represent `ANY` HTTP method. `HttpMethod` enum doesn't 
have a value for that, thus causing errors when passing  `HttpMethod` 's `ANY` option.

This commit introduces `CorsHttpMethod` enum which has a proper `ANY` mapping to `*`.

Closes #13280.
Closes #13643.

BREAKING CHANGE: The type of `allowMethods` property under `corsPreflight`
section is changed from `HttpMethod` to `CorsHttpMethod`.

----

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

closes #12932
closes #12931
closes #12930


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…onds results in an error (#13689)

A previous change - b1449a1 - introduced a validation that should have
been applied only when Duration is specified as a token. Instead, it was
applied for non token values as well.

Adjusting the validation so it only applies to when the duration is a
token.

fixes #13566


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ed" error (#13637)

Previously access control lists for putObject was not called.
This had led in getting access denied issue when trying to upload
objects into the s3 bucket

fixes #13557 


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@nija-at nija-at changed the title chore(lambda-nodejs): remove usage of deprecated BundlingDockerImage chore(lambda-nodejs): prepare code to reduce merge conflicts when deprecated APIs are stripped Mar 23, 2021
@@ -11,7 +11,7 @@ import * as util from '../lib/util';
jest.mock('@aws-cdk/aws-lambda');

// Mock BundlingDockerImage.fromAsset() to avoid building the image
let fromAssetMock = jest.spyOn(BundlingDockerImage, 'fromAsset');
let fromAssetMock = jest.spyOn(DockerImage, 'fromBuild');
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: adapt the comment above

@mergify
Copy link
Contributor

mergify bot commented Mar 24, 2021

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
Collaborator

AWS CodeBuild CI Report

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

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

@mergify
Copy link
Contributor

mergify bot commented Mar 24, 2021

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

@mergify mergify bot merged commit ca391b5 into master Mar 24, 2021
@mergify mergify bot deleted the nija-at/bundling-deprecated branch March 24, 2021 16:41
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Mar 24, 2021
…recated APIs are stripped (aws#13738)

BUNDLING - The `BundlingDockerImage` class is deprecated,
replaced by `DockerImage`. Remove all uses of this class
across modules in a backwards compatible way.

ECR ASSET - Change the way symbols are imported from
'@aws-cdk/assets' so that they can be in-place replaced with
their replacements from '@aws-cdk/core' module.
The `IAsset` interface from the core module introduces the
property `assetHash` instead of `sourceHash`. This change
makes the code forwards compatible so as to be supportive
on v2.

Other small backwards compatible changes.

BREAKING CHANGE: The type of `image` property in the
`Bundling` class is changed from `BundlingDockerImage` to
`DockerImage`.
* **lambda-nodejs**: The type of `dockerImage` property in
`BundlingOptions` is changed from `BundlingDockerImage` to
`DockerImage`.

----

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

@nija-at The docs should be updated, as this is a breaking change for Java projects (#13945)

hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
…recated APIs are stripped (aws#13738)

BUNDLING - The `BundlingDockerImage` class is deprecated,
replaced by `DockerImage`. Remove all uses of this class
across modules in a backwards compatible way.

ECR ASSET - Change the way symbols are imported from
'@aws-cdk/assets' so that they can be in-place replaced with
their replacements from '@aws-cdk/core' module.
The `IAsset` interface from the core module introduces the
property `assetHash` instead of `sourceHash`. This change
makes the code forwards compatible so as to be supportive
on v2.

Other small backwards compatible changes.

BREAKING CHANGE: The type of `image` property in the
`Bundling` class is changed from `BundlingDockerImage` to
`DockerImage`.
* **lambda-nodejs**: The type of `dockerImage` property in
`BundlingOptions` is changed from `BundlingDockerImage` to
`DockerImage`.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-nodejs contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants