terraform-cdk icon indicating copy to clipboard operation
terraform-cdk copied to clipboard

CDKTF: Upgrade to 0.20 causes failures during go mod tidy

Open eahrend opened this issue 1 year ago • 2 comments

Expected Behavior

  1. Update the package.json to use cdktf 0.20.1
  2. Run npm install
  3. Update the go.mod file to upgrade github.com/hashicorp/terraform-cdk-go/cdktf to v0.20.1
  4. Run go mod tidy

Then everything works

Actual Behavior

Go mod tidy fails with the following errors (truncated, but all in the same directory):

github.com/eahrend/cloud-infrastructure/node_modules/@cdktf/provider-generator/node_modules/jsii-rosetta/test/translations/calls: import path "github.com/eahrend/cloud-infrastructure/node_modules/@cdktf/provider-generator/node_modules/jsii-rosetta/test/translations/calls" should not have @version

Steps to Reproduce

  1. Update the package.json to use cdktf 0.20.1
  2. Run npm install
  3. Update the go.mod file to upgrade github.com/hashicorp/terraform-cdk-go/cdktf to v0.20.1
  4. Run go mod tidy

Versions

cdktf debug doesn't work, but here is the output:

erik@Erik-Ahrends-MacBook-Pro cloud-infrastructure % cdktf debug
[2024-01-17T12:54:43.244] [ERROR] default - go: updates to go.mod needed; to update it:
	go mod tidy

go: updates to go.mod needed; to update it:
	go mod tidy
[2024-01-17T12:54:43.246] [ERROR] default - go: updates to go.mod needed; to update it:
	go mod tidy

go: updates to go.mod needed; to update it:
	go mod tidy
[2024-01-17T12:54:43.246] [ERROR] default - go: updates to go.mod needed; to update it:
	go mod tidy

go: updates to go.mod needed; to update it:
	go mod tidy
cdktf debug
language: go
cdktf-cli: 0.18.2
node: v20.4.0
cdktf: null
constructs: null
jsii: null
terraform: 1.5.3
arch: arm64
os: darwin 23.2.0
go: go version go1.20.3 darwin/arm64

Providers

Fails with the following error:

erik@Erik-Ahrends-MacBook-Pro cloud-infrastructure % cdktf provider list
[2024-01-17T12:55:33.691] [ERROR] default - go: updates to go.mod needed; to update it:
	go mod tidy

Gist

No response

Possible Solutions

No response

Workarounds

Removing the directory node_modules/@cdktf/provider-generator/node_modules/jsii-rosetta/node_modules/tests will allow me to finish running go mod tidy

Anything Else?

No response

References

No response

Help Wanted

  • [ ] I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

eahrend avatar Jan 17 '24 17:01 eahrend

Hey, could you tell us a bit more about your setup? I'm a bit confused why there is a package.json in the golang project.

DanielMSchmidt avatar Jan 18 '24 16:01 DanielMSchmidt

Hi there! 👋 We haven't heard from you in 15 days and would like to know if the problem has been resolved or if you still need help. If we don't hear from you before then, I'll auto-close this issue in 30 days.

github-actions[bot] avatar Feb 10 '24 02:02 github-actions[bot]

I'm closing this issue because we haven't heard back in 45 days. ⌛️ If you still need help, feel free to comment or reopen the issue!

github-actions[bot] avatar Mar 11 '24 02:03 github-actions[bot]

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Apr 11 '24 01:04 github-actions[bot]