-
Notifications
You must be signed in to change notification settings - Fork 460
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
feat(provider-generator): handle 'tuple' type for variable #2964
feat(provider-generator): handle 'tuple' type for variable #2964
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a shot at this. Need to make a few adjustments and then you should be good to add some test cases.
packages/@cdktf/provider-generator/lib/get/generator/module-generator.ts
Outdated
Show resolved
Hide resolved
packages/@cdktf/provider-generator/lib/get/generator/module-generator.ts
Outdated
Show resolved
Hide resolved
@jsteinich I've make few change, and trying to make test case in https://github.com/hashicorp/terraform-cdk/blob/main/packages/@cdktf/provider-generator/lib/get/__tests__/generator/module-generator.test.ts (I've put test tf file inside
I'm trying with following https://github.com/hashicorp/terraform-cdk/blob/main/packages/%40cdktf/provider-generator/package.json#L15
Could you give suggestion how to make testing for this? |
Might just need to reinstall dependencies ( You can also likely simplify your test to just use |
@jsteinich thanks.
but it failed as:
Thanks. |
expectModuleToMatchSnapshot("tuple type", "generator", [
"local-variable/variable.tf",
]); |
@jsteinich I've just added variable inside existing template.
What I've expect in comment part should be |
That's certainly not what it should be, but I don't believe anything in the PR introduced that behavior. Can make another issue to keep track of that. |
@jsteinich thanks for notice. Anyway, this part makes test failure, so it couldn't pass the checks. So options I can think is...
How do you think? |
I think it makes sense to just update the snapshot so that it passes. Can leave a comment on the test case about it. |
Updating the snapshot would be fine with me if we also create an issue to improve the generator to fix how these defaults are rendered 👍 |
@ansgarm @jsteinich thanks for suggestion. Than I'll go on with this. https://github.com/hashicorp/terraform-cdk/actions/runs/5628083685/job/15251540738?pr=2964 |
Looks like this got broken with #2990. You might need to pull in latest main to see the issue locally. Can probably lump it into a follow-up issue to fix. |
@jsteinich could you confirm following once more? |
I would guess a line ending issue. |
@jsteinich I've tried to change, but git cannot find diff of this. |
@jsteinich thanks for update. But seems still there are failures on check. Could you confirm whether these are related with this update? |
50fd7d1
to
fc904ab
Compare
Hi @kination 👋 fyi, I just rebased your branch onto |
@ansgarm thanks for your help! |
Oh, yeah, missed that. That's just something we have to click for third party PRs 😅 |
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 #1618
Description
Allow
tuple
for variable typeChecklist