You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
When running cdk watch the hotswap operation for the ViewHitCounterRendered function created by this construct library does not successfully deploy. However, when I run cdk deploy without the --hotswap flag it is successful.
To be fair I'm not yet sure if this is a hotswap bug or a construct library bug, but in either situation it should be documented in the cdkworkshop unless this is a personal problem for just me.
Expected Behavior
I would expect the cdk deploy --hotswap command to yield the same result as cdk deploy but that is not the case.
Current Behavior
✨ hotswapping resources:
✨ Lambda Function 'cdk-workshop-ViewHitCounterRendered9C783E55-Nix6HHH67xmc'
✨ Lambda Function 'cdk-workshop-ViewHitCounterRendered9C783E55-Nix6HHH67xmc' hotswapped!
❌ cdk-workshop failed: InvalidParameterType: Expected params.Environment.Variables['TABLE_NAME'] to be a string
at ParamValidator.fail (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-sdk/lib/param_validator.js:50:37)
at ParamValidator.validateType (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-sdk/lib/param_validator.js:233:10)
at ParamValidator.validateString (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-sdk/lib/param_validator.js:155:32)
at ParamValidator.validateScalar (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-sdk/lib/param_validator.js:131:21)
at ParamValidator.validateMember (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-sdk/lib/param_validator.js:95:21)
at ParamValidator.validateMap (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-sdk/lib/param_validator.js:118:14)
at ParamValidator.validateMember (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-sdk/lib/param_validator.js:93:21)
at ParamValidator.validateStructure (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-sdk/lib/param_validator.js:76:14)
at ParamValidator.validateMember (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-sdk/lib/param_validator.js:89:21)
at ParamValidator.validateStructure (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-sdk/lib/param_validator.js:76:14) {
code: 'InvalidParameterType',
time: 2022-09-16T15:30:39.374Z
}
❌ Deployment failed: Error: Stack Deployments Failed: InvalidParameterType: Expected params.Environment.Variables['TABLE_NAME'] to be a string
at deployStacks (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-cdk/lib/deploy.ts:61:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at CdkToolkit.deploy (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:312:7)
at CdkToolkit.invokeDeployFromWatch (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:756:7)
at deployAndWatch (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:371:7)
at FSWatcher.<anonymous> (/local/home/benpte/.nvm/versions/node/v16.17.0/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:400:9)
Reproduction Steps
This code snippet from the cdk_workshop_stack.py file as described in the workshop produces the error when running cdk deploy --hotswap and is successful when running cdk deploy
It looks like this is a feature request that has since been closed:
"Since Function's environment update is not considered hotswappable, user can never perform a hotswap deployment with this code."
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugThis issue is a bug.effort/smallSmall work item – less than a day of effortp1
Describe the bug
When running
cdk watch
the hotswap operation for the ViewHitCounterRendered function created by this construct library does not successfully deploy. However, when I runcdk deploy
without the --hotswap flag it is successful.To be fair I'm not yet sure if this is a hotswap bug or a construct library bug, but in either situation it should be documented in the cdkworkshop unless this is a personal problem for just me.
Expected Behavior
I would expect the
cdk deploy --hotswap
command to yield the same result ascdk deploy
but that is not the case.Current Behavior
✨ hotswapping resources:
✨ Lambda Function 'cdk-workshop-ViewHitCounterRendered9C783E55-Nix6HHH67xmc'
✨ Lambda Function 'cdk-workshop-ViewHitCounterRendered9C783E55-Nix6HHH67xmc' hotswapped!
Reproduction Steps
This code snippet from the cdk_workshop_stack.py file as described in the workshop produces the error when running
cdk deploy --hotswap
and is successful when runningcdk deploy
Possible Solution
No response
Additional Information/Context
I actually found this running cdk watch and then realized it is a hotswap error.
CDK CLI Version
2.41.0 (build 6ad48a3)
Section
No response
Browser
No response
Language
Python
The text was updated successfully, but these errors were encountered: