-
Notifications
You must be signed in to change notification settings - Fork 17
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
Potentially cached values in cdk.context.json can break deployments #67
Comments
👍 Definitely a good idea to build some fail-safes for this. Another cache that has caused issues in the past is |
I fixed tihs issue by manually deleting cdk.context.json |
For anyone else who comes searching, I have been using Making absolutely zero changes of any kind, I just deleted This is not directly related to the original content of the subnet thing, but, is just another example of (Aaaand I just realized this isn't the official aws-cdk repo 😆 Oh well, as this tool seems to use |
It seems context is only updated during Now since most users wouldn't need the cache with LocalStack I guess it's reasonable to add the context clear command run as a default behaviour and for those who need it lets provide an env variable to keep it, ie Ref to the relevant docs of CDK: https://docs.aws.amazon.com/cdk/v2/guide/context.html /cc @dominikschubert |
Seems like CDK is caching values in
cdk.context.json
that are not always updated oncdk bootstrap
orcdk deploy
.For example, just ran into a case where
cdk.context.json
contained cached local VPC/subnet details:... and upon deployment of an
AWS::RDS::DBSubnetGroup
resource that was referencing one of the subnets, the deployment failed, as this subnet was no longer returned fromawslocal ec2 describe-subnets
(double-checked that the region was correct).We should consider deleting the
cdk.context.json
cache file (or updating its entries) oncdklocal bootstrap
and/orcdklocal deploy
, to ensure we're not using stale entries for deployment../cc @dominikschubert
The text was updated successfully, but these errors were encountered: