-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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(amplify-alpha): migrate asset deployment handler #27955
Conversation
Signed-off-by: Francis <[email protected]>
Signed-off-by: Francis <[email protected]>
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). |
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). |
…28658) Error: ```bash Error: Cannot find entry file at /node_modules/@aws-cdk/custom-resource-handlers/dist/ aws-amplify-alpha/asset-deployment-handler/index.js ``` In #27955, we migrated the aws-amplify-alpha custom resource to `@aws-cdk/custom-resource-handlers`, our internal package for storing all custom resources. However, this migration was half-baked. The reason is because we seem to have depended on our `@aws-cdk/custom-resource-handlers` package directly. That works locally, as we have `custom-resource-handlers` readily available. ``` |-- @aws-cdk |-- aws-amplify-alpha |-- custom-resource-handlers ``` `aws-amplify-alpha` directly went into `custom-resource-handlers` to grab the necessary entry file. This works locally, because we have access to all folders with impunity. Of course, when packaged and published, we publish only `aws-amplify-alpha` with no other outside folders: ``` |-- @aws-cdk |-- aws-amplify-alpha ``` Thus, the published module would not have access to the file under `custom-resource-handlers`, and predictably fails at synth time. In `aws-cdk-lib`, we airlift the necessary files _into_ the package and release it alongside `aws-cdk-lib`: ``` |-- aws-cdk-lib |-- aws-synthetics |-- custom-resource-handlers/dist/aws-synthetics/custom-resource-handler // this was airlifted into aws-cdk-lib ``` We are supposed to do the same airlift mechanism for `aws-amplify-alpha` but somehow that was forgotten. This PR adds in the necessary structure, so now `aws-amplify-alpha` looks like this: ``` |-- @aws-cdk |-- aws-amplify-alpha |-- custom-resource-handlers/dist/aws-amplify-alpha // airlifted in via this PR |-- custom-resource-handlers/dist |-- aws-amplify-alpha ``` (please excuse my horrible ascii notation) Fixes #28633. Fixes #28089. I tested my locally packaged `aws-amplify-alpha` on a local CDK app to confirm that the necessary structure exists in the packaged module. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This PR moves the migrate asset deployment handler to our new centralized location for custom resource handlers in the @aws-cdk package.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license