Open gillisandrew opened 2 years ago
Interesting ideas, will keep them in mind, thanks.
In the mean time, the cdk context
command was intended to be the primary method for interacting with those. I'm not opposed to changes that will make that command more powerful.
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Bump.
Describe the feature
Users need better tooling for managing context caching behaviors and for maintaining
cdk.context.json
cached values.Use Case
Users regularly open issues regarding stale values being returned by ContextProvider-enabled features (e.g.
Parameter.valueFromLookup
). As AWS itself recommends commitingcdk.context.json
to source control to ensure reproducible builds, additional tooling should support maintaining it as well as control caching behaviors of lookups in general.Proposed Solution
cdk context --reset <key or number>
cli command. Allow wildcard key matching and environment-based filtering so unused values can be removed without impacting determinism of the synthesis.If plugin-registered context-providers do eventually leave alpha, consider calling a staleness check with the cached values on context providers to support more complex cache-busting behaviors.
Other Information
No response
Acknowledgements
CDK version used
2.19.0
Environment details (OS name and version, etc.)
Windows 11 (WSL2 Ubuntu 20.04)