Skip to content
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

The terraform-provider-kubectl_v2.1.2 plugin crashed #201

Closed
AnitaErnszt opened this issue Nov 5, 2024 · 3 comments
Closed

The terraform-provider-kubectl_v2.1.2 plugin crashed #201

AnitaErnszt opened this issue Nov 5, 2024 · 3 comments

Comments

@AnitaErnszt
Copy link

We've recently started using this provider (replaced the legacy kubectl provider, as it's not maintained anymore)

Since this morning our Terraform is unable to run (running on TF Cloud), and we are getting the following error:

Stack trace from the terraform-provider-kubectl_v2.1.2 plugin:

panic: runtime error: slice bounds out of range [17506:15534]

goroutine 924 [running]:
github.com/sergi/go-diff/diffmatchpatch.(*DiffMatchPatch).patchMake2(0xc00077ad08, {0xc000742000?, 0x1?}, {0xc00111e008?, 0x15, 0x40cce28000000000?})
github.com/sergi/[email protected]/diffmatchpatch/patch.go:171 +0x96a
github.com/sergi/go-diff/diffmatchpatch.(*DiffMatchPatch).PatchMake(0xc00077ad08, {0xc00077abf8?, 0x6e?, 0x7f?})
github.com/sergi/[email protected]/diffmatchpatch/patch.go:131 +0x30b
github.com/sergi/go-diff/diffmatchpatch.(*DiffMatchPatch).PatchMake(0xc00077ad08, {0xc0008e6e50?, 0x2?, 0xc0008e6ea0?})
github.com/sergi/[email protected]/diffmatchpatch/patch.go:129 +0x2da
github.com/alekc/terraform-provider-kubectl/kubernetes.resourceKubectlManifest.func6({0x2790888?, 0xc0006db5c0?}, 0xc000d62a00, {0xd?, 0x22c74ad?})
github.com/alekc/terraform-provider-kubectl/kubernetes/resource_kubectl_manifest.go:312 +0xd77
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc0005596b0, {0x2790888, 0xc0006db5c0}, 0xc000772dd0, 0xc000a156e0, 0x2568798, {0x20149e0, 0xc0002aa6c8}, 0x0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:698 +0x4b4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0x27907a8?, {0x2790888?, 0xc0006db5c0?}, 0xc000772dd0, 0xc0006db5f0?, {0x20149e0?, 0xc0002aa6c8?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:962 +0xdb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).PlanResourceChange(0xc0008bc018, {0x2790888?, 0xc0006db410?}, 0xc000e10230)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:780 +0x996
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).PlanResourceChange(0xc000710280, {0x2790888?, 0xc0006da930?}, 0xc0002e2070)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:824 +0x56f
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_PlanResourceChange_Handler({0x21c41e0, 0xc000710280}, {0x2790888, 0xc0006da930}, 0xc000d2c180, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:449 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0008be000, {0x2790888, 0xc0006da750}, {0x279ece0, 0xc0003d2180}, 0xc001504000, 0xc000701c80, 0x39dd940, 0x0)
google.golang.org/[email protected]/server.go:1379 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc0008be000, {0x279ece0, 0xc0003d2180}, 0xc001504000)
google.golang.org/[email protected]/server.go:1790 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1029 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 68
google.golang.org/[email protected]/server.go:1040 +0x125

Error: The terraform-provider-kubectl_v2.1.2 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Tried various TF versions and having the same issue

@sl1pm4t
Copy link
Contributor

sl1pm4t commented Nov 5, 2024

This is the same as #181 and fixed in #194 (although a release has not been cut since that PR was merged).

@alekc
Copy link
Owner

alekc commented Nov 6, 2024

Launched the release of 2.1.3 (should be done in an hour or so)
It should fix it.

@AnitaErnszt
Copy link
Author

I have upgraded the provider and can confirm the new version is working. Thanks for the quick action! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants