-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feat (CLI): Addition of a flag to override the context json file path #30494
Comments
Hi @karmabadger , thanks for reaching out. I see your usecase could be worked upon by the solution suggested here - However we have this open issue and few similar requests in the past as well - Please confirm if you feel the issue is similar to open issue and I could mark it appropriately for further assistance. |
it is similar, but also those are long due |
@khushail I had also submitted a PR implementing the feature. But since I am no TypeScript expert, I could not figure out the tests. So it was not merged. For a feature that was requested exactly 3 years ago, with a potential solution shared 1.5 years ago, it is still open because nobody wants to take up updating the unit tests. |
@karmabadger , thanks for the response. I have marked the issue as P1 for team's input and attention as this is a repeated request. @virajkanwade , appreciate your work on PR submission. Apologies, you were not able to get the needed help. Here are few resources you could use to get the required help -
Generally the PR review would first go through community review and then maintainers review, but if you complete the PR with CI pass I think you can cut an internal ticket to escalate the review directly to the core team. Let me know if you need any help. |
@karmabadger It would be helpful if you could clarify all the keys in Does that address your use case, or is there other keys you'd like to change? |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the feature
Feat (CLI): Addition of a flag to override the context json file path.
Often times, you may have different environments and deployment strategies. Being able to switch the cdk.json context file easily helps keeping commands constant but easily switch the context which is used to run them.
For instance package.json can have a script
deploy
which usescdk.json
and then adeploy:dev
which readscdk.dev.json
.Use Case
I'm always frustrated when I want a quick dev stack for development purposes but my prod stack has to compile all the TS files into JS, run tests, and then deploy whereas the dev stack should just quickly transpile into JS using something like SWC for quicker iteration. But since I need to make sure my prod environment run correctly from the built JS files instead of SWC, I have to keep everything consistent to the slower path.
Proposed Solution
adding the flag
--context-json
(or any other alternative to this if this is too confusing compared to the other context flag) to override the defaultcdk.json
file.Other Information
No response
Acknowledgements
CDK version used
2.144.0 (build 5fb15bc)
Environment details (OS name and version, etc.)
MacOS Sonoma 14.5
The text was updated successfully, but these errors were encountered: