Repository navigation
Conversation
@jsteinich - should we add |
I would go with |
|
also I identify a failed check is due to the conditions, it fails on skipped jobs, so I’ll push a fix to main for that - will let you know when to rebase |
After careful analysis:
No workflow changes required. |
b15b98a to
2c033e8
Compare
…able type parsing (#61) ## Summary - Includes the fix from #60 by @josh-hook to handle inline comments with brackets in Terraform variable type constraints during schema parsing - Adds the missing test snapshot that was not committed in the original PR Closes #60 ## Test plan - [x] Snapshot generated locally with `yarn test:update` in `packages/@cdktn/provider-schema` - [ ] CI unit tests pass with the new snapshot 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Josh Hook <joshhook@live.co.uk> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
don't know why it says closed.. I rebased your branch through the GH UI - then branched off the rebase and kept the same commit sha - I never understand why GH UI doesn't show these as anyway - @josh-hook - we should have this in the next release - thanks for the fix |
|
I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Related issue
Fixes #39
Description
This PR fixed
cdktn getcommand failing to generate code from downstream Terraform that contains a variable with type including a closing bracket in the comments.Example offending Terraform:
(currently present in the Karpenter Terraform module)
The code generation fails due to the
transformVariablesCDKTN function that's parsing the variable type definition. Since the regex does not match newlines, it ends up matching to the commented-out}character, causing the resulting type to be parsed aslist(object({ # TODO - change to map(object({..., which then later can't be parsed to an expression.Previous approach: match everything on the first line which is wrapped in
${...}, everything else is anany.Proposed fix: If it's a single-line type then grab everything between the starting
${and ending}, else it's anany.This PR also fixes the
hcl2json/hcl-toolsprebuild.sh script as in later versions of Go the wasm directory has changed frommisctolib.Checklist