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

custom-resources: PR:29648 caused Custom resources to be replaced #30121

Open
p3tek opened this issue May 9, 2024 · 2 comments
Open

custom-resources: PR:29648 caused Custom resources to be replaced #30121

p3tek opened this issue May 9, 2024 · 2 comments
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources bug This issue is a bug.

Comments

@p3tek
Copy link

p3tek commented May 9, 2024

Describe the bug

the following PR - #29648 added an additional "logApiResponseData":true to the custom resource properties.

This triggered a replacement of existing custom resources which is not a good outcome for "onCreate" resources that are only meant to be executed once

Expected Behavior

Not have existing custom-resources replaced with this update.

Current Behavior

"logApiResponseData":true was not present prior to this PR and the custom resource was not triggered on stack update

Reproduction Steps

will trigger after an update of aws-cdk-lib

Possible Solution

allow this value to be suppressed so it doesn't trigger a resource replacement ?

Additional Information/Context

No response

CDK CLI Version

2.138.0

Framework Version

2.138.0

Node.js Version

18.16.1

OS

linux

Language

TypeScript

Language Version

No response

Other information

No response

@p3tek p3tek added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 9, 2024
@github-actions github-actions bot added the @aws-cdk/custom-resources Related to AWS CDK Custom Resources label May 9, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels May 9, 2024
@khushail khushail self-assigned this May 9, 2024
@khushail
Copy link
Contributor

Hi @p3tek , could you please share the minimum reproducible code for repro of the issue.

@khushail khushail added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels May 17, 2024
@colifran
Copy link
Contributor

Hey @p3tek, thanks for raising this. From what I'm seeing the problem isn't necessarily the new event property being passed. What I mean is that any change we make to the underlying handler code (new property or not) will also trigger an update since it will force a change in the asset hash. This would lock us into a situation where we are unable to make any code changes because they would all force an update. Are you able to just duplicate whatever SDK call you're making for onUpdate so that you keep the same behavior in the event of an update?

@khushail khushail removed their assignment May 17, 2024
@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants