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

fix: null pointer in resource_mongodbatlas_cloud_backup_schedule.go #1353

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

andreaangiolillo
Copy link
Collaborator

Description

This error came up as part of the help ticket https://jira.mongodb.org/browse/HELP-48422

Link to any related issue(s): INTMDB-966

Null pointer error:

panic: runtime error: invalid memory address or nil pointer dereference
--
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x1a15e30]
 
goroutine 37 [running]:
github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas.cloudBackupScheduleCreateOrUpdate({0x20338c8, 0xc000c8e300}, 0xc000a74000, 0xc000000001?, {0xc00003c4e0, 0x18}, {0xc0007ae190, 0xa})
github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas/resource_mongodbatlas_cloud_backup_schedule.go:537 +0xc70
github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas.resourceMongoDBAtlasCloudBackupScheduleCreate({0x20338c8, 0xc000c8e300}, 0x0?, {0x1b956c0?, 0xc000a37b80?})
github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas/resource_mongodbatlas_cloud_backup_schedule.go:287 +0x125
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc0008c1420, {0x2033900, 0xc000bf6d50}, 0xd?, {0x1b956c0, 0xc000a37b80})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:733 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0008c1420, {0x2033900, 0xc000bf6d50}, 0xc00014ca90, 0xc000bf2f00, {0x1b956c0, 0xc000a37b80})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:864 +0xa7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000245d28, {0x2033900?, 0xc000bf6c30?}, 0xc000172460)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1024 +0xe8d
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0001af400, {0x2033900?, 0xc000bf6240?}, 0xc000be8070)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:821 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x1c98780?, 0xc0001af400}, {0x2033900, 0xc000bf6240}, 0xc000be8000, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:422 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000262000, {0x20384c0, 0xc0006024e0}, 0xc0007be120, 0xc0008af590, 0x2705ca0, 0x0)
google.golang.org/[email protected]/server.go:1337 +0xdf3
google.golang.org/grpc.(*Server).handleStream(0xc000262000, {0x20384c0, 0xc0006024e0}, 0xc0007be120, 0x0)
google.golang.org/[email protected]/server.go:1714 +0xa36
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/[email protected]/server.go:959 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:957 +0x18c

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contribution guidelines
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

@andreaangiolillo andreaangiolillo requested a review from a team as a code owner July 27, 2023 16:14
@andreaangiolillo andreaangiolillo merged commit 7550cf1 into master Jul 28, 2023
@andreaangiolillo andreaangiolillo deleted the INTMDB-966 branch July 28, 2023 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants