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

[BUG]: github_release resource creates drift, leading to provider error #2062

Open
1 task done
simpl-sam opened this issue Dec 18, 2023 · 1 comment · May be fixed by #2350
Open
1 task done

[BUG]: github_release resource creates drift, leading to provider error #2062

simpl-sam opened this issue Dec 18, 2023 · 1 comment · May be fixed by #2350
Labels
Status: Stale Used by stalebot to clean house Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@simpl-sam
Copy link

Expected Behavior

When applying the github_release resource with the argument generate_release_notes set to true, the release would be created and subsequent plans to terraform plan would show the body value to now contain the generated release notes and the generate_release_notes flag is set to false.

Setting the body and generate_release_notes arguments in the Terraform template to match the delta, will cause a subsequent plan to report "no changes"

Actual Behavior

The delta is still being seen as a change, but not presenting what is different (might be tabs vs spaces or something like that)

Applying the changes produces a provider error

Terraform Version

v1.6.3

Affected Resource(s)

  • github_release

Terraform Configuration Files

No response

Steps to Reproduce

  • Create a release resource which generates release notes
  • terraform apply
  • backfill notes post-apply back into template
  • terraform plan
  • terraform apply

Debug Output

No response

Panic Output

╷
│ Error: Plugin did not respond
│ 
│   with module.repository.github_release.v1_0_0,
│   on modules/repository/releases.tf line 21, in resource "github_release" "v1_0_0":
│   21: resource "github_release" "v1_0_0" {
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵
╷
│ Error: Plugin did not respond
│ 
│   with module.repository.github_release.v1_1_0,
│   on modules/repository/releases.tf line 4, in resource "github_release" "v1_1_0":
│    4: resource "github_release" "v1_1_0" {
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵

Stack trace from the terraform-provider-github_v5.42.0 plugin:

panic: interface conversion: interface {} is nil, not int64

goroutine 85 [running]:
github.com/integrations/terraform-provider-github/v5/github.resourceGithubReleaseCreateUpdate(0xc00054e2a0, {0x10c4100?, 0xc000786580?})
        github.com/integrations/terraform-provider-github/v5/github/resource_github_release.go:134 +0xafa
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc0005b6960, 0xc0008d20f0, 0xc0008d8680, {0x10c4100, 0xc000786580})
        github.com/hashicorp/terraform-plugin-sdk@v1.17.2/helper/schema/resource.go:326 +0x5e3
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc00058a400, 0xc0009078e8, 0x136789d?, 0xf?)
        github.com/hashicorp/terraform-plugin-sdk@v1.17.2/helper/schema/provider.go:294 +0x6a
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc00008b238, {0xc0006843f0?, 0x4c3b06?}, 0xc0006843f0)
        github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/helper/plugin/grpc_provider.go:895 +0x7c5
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x1309dc0?, 0xc00008b238}, {0x17246d0, 0xc0008b7470}, 0xc000684380, 0x0)
        github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/tfplugin5/tfplugin5.pb.go:3305 +0x169
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0005d0000, {0x1729e10, 0xc0001de000}, 0xc0008c67e0, 0xc0005cb020, 0x2041d60, 0x0)
        google.golang.org/grpc@v1.56.3/server.go:1335 +0xde7
google.golang.org/grpc.(*Server).handleStream(0xc0005d0000, {0x1729e10, 0xc0001de000}, 0xc0008c67e0, 0x0)
        google.golang.org/grpc@v1.56.3/server.go:1712 +0x9e7
google.golang.org/grpc.(*Server).serveStreams.func1.1()
        google.golang.org/grpc@v1.56.3/server.go:947 +0xbb
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 25
        google.golang.org/grpc@v1.56.3/server.go:958 +0x145

Error: The terraform-provider-github_v5.42.0 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.

Operation failed: failed running terraform apply (exit 1)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@simpl-sam simpl-sam added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Dec 18, 2023
@nickfloyd nickfloyd added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Jan 4, 2024
@findmyname666 findmyname666 linked a pull request Aug 15, 2024 that will close this issue
4 tasks
Copy link

github-actions bot commented Oct 1, 2024

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Used by stalebot to clean house Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants