Skip to content

Commit

Permalink
Bump github.com/hashicorp/terraform-plugin-log from 0.2.1 to 0.3.0 (#166
Browse files Browse the repository at this point in the history
)

* Bump github.com/hashicorp/terraform-plugin-log from 0.2.1 to 0.3.0

Bumps [github.com/hashicorp/terraform-plugin-log](https://github.com/hashicorp/terraform-plugin-log) from 0.2.1 to 0.3.0.
- [Release notes](https://github.com/hashicorp/terraform-plugin-log/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-log/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-plugin-log@v0.2.1...v0.3.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-log
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* all: Update calls to terraform-plugin-log for function parameter breaking change

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brian Flad <bflad417@gmail.com>
  • Loading branch information
dependabot[bot] and bflad authored Mar 10, 2022
1 parent 8da41e2 commit 7d4431a
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 86 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go 1.16

require (
github.com/google/go-cmp v0.5.7
github.com/hashicorp/go-hclog v1.1.0
github.com/hashicorp/go-hclog v1.2.0
github.com/hashicorp/go-plugin v1.4.3
github.com/hashicorp/go-uuid v1.0.2
github.com/hashicorp/terraform-plugin-log v0.2.1
github.com/hashicorp/terraform-plugin-log v0.3.0
github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896
github.com/mitchellh/go-testing-interface v1.14.1
github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce
Expand Down
9 changes: 4 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,15 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v1.1.0 h1:QsGcniKx5/LuX2eYoeL+Np3UKYPNaN7YKpTh29h8rbw=
github.com/hashicorp/go-hclog v1.1.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM=
github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-plugin v1.4.3 h1:DXmvivbWD5qdiBts9TpBC7BYL1Aia5sxbRgQB+v6UZM=
github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE=
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/terraform-plugin-log v0.2.1 h1:hl0G6ctSx7DRTE62VNsPWrq7d+JWy1kjk9ApOFrCq3I=
github.com/hashicorp/terraform-plugin-log v0.2.1/go.mod h1:RW/n0x4dyITmenuirZ1ViPQGP5JQdPTZ4Wwc0rLKi94=
github.com/hashicorp/terraform-plugin-log v0.3.0 h1:NPENNOjaJSVX0f7JJTl4f/2JKRPQ7S2ZN9B4NSqq5kA=
github.com/hashicorp/terraform-plugin-log v0.3.0/go.mod h1:EjueSP/HjlyFAsDqt+okpCPjkT4NDynAe32AeDC4vps=
github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 h1:1FGtlkJw87UsTMg5s8jrekrHmUPUJaMcu6ELiVhQrNw=
github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896/go.mod h1:bzBPnUIkI0RxauU8Dqo+2KrZZ28Cf48s8V6IHt3p4co=
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0=
Expand Down
3 changes: 3 additions & 0 deletions internal/logging/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ package logging
// Practitioners or tooling reading logs may be depending on these keys, so be
// conscious of that when changing them.
const (
// Underlying error string
KeyError = "error"

// A unique ID for the RPC request
KeyRequestID = "tf_req_id"

Expand Down
8 changes: 4 additions & 4 deletions internal/logging/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ const (
)

// ProtocolError emits a protocol subsystem log at ERROR level.
func ProtocolError(ctx context.Context, msg string, args ...interface{}) {
tfsdklog.SubsystemError(ctx, SubsystemProto, msg, args)
func ProtocolError(ctx context.Context, msg string, additionalFields ...map[string]interface{}) {
tfsdklog.SubsystemError(ctx, SubsystemProto, msg, additionalFields...)
}

// ProtocolTrace emits a protocol subsystem log at TRACE level.
func ProtocolTrace(ctx context.Context, msg string, args ...interface{}) {
tfsdklog.SubsystemTrace(ctx, SubsystemProto, msg, args)
func ProtocolTrace(ctx context.Context, msg string, additionalFields ...map[string]interface{}) {
tfsdklog.SubsystemTrace(ctx, SubsystemProto, msg, additionalFields...)
}
7 changes: 4 additions & 3 deletions internal/logging/protocol_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,18 @@ func ProtocolData(ctx context.Context, dataDir string, rpc string, message strin

fileName := fmt.Sprintf("%d_%s_%s_%s.%s", time.Now().Unix(), rpc, message, field, fileExtension)
filePath := path.Join(dataDir, fileName)
logFields := map[string]interface{}{KeyProtocolDataFile: filePath} // should not be persisted using With()

ProtocolTrace(ctx, "Writing protocol data file", KeyProtocolDataFile, filePath)
ProtocolTrace(ctx, "Writing protocol data file", logFields)

err := os.WriteFile(filePath, fileContents, 0644)

if err != nil {
ProtocolError(ctx, fmt.Sprintf("Unable to write protocol data file: %s", err), KeyProtocolDataFile, filePath)
ProtocolError(ctx, fmt.Sprintf("Unable to write protocol data file: %s", err), logFields)
return
}

ProtocolTrace(ctx, "Wrote protocol data file", KeyProtocolDataFile, filePath)
ProtocolTrace(ctx, "Wrote protocol data file", logFields)
}

func protocolDataDynamicValue5(_ context.Context, value *tfprotov5.DynamicValue) (string, []byte) {
Expand Down
72 changes: 36 additions & 36 deletions tfprotov5/tf5server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,19 +491,19 @@ func (s *server) GetSchema(ctx context.Context, req *tfplugin5.GetProviderSchema
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.GetProviderSchemaRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.GetProviderSchema(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
ret, err := toproto.GetProviderSchema_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand All @@ -518,21 +518,21 @@ func (s *server) PrepareProviderConfig(ctx context.Context, req *tfplugin5.Prepa
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.PrepareProviderConfigRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", r.Config)
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.PrepareProviderConfig(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Response", "PreparedConfig", resp.PreparedConfig)
ret, err := toproto.PrepareProviderConfig_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand All @@ -547,20 +547,20 @@ func (s *server) Configure(ctx context.Context, req *tfplugin5.Configure_Request
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.ConfigureProviderRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", r.Config)
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.ConfigureProvider(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
ret, err := toproto.Configure_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand Down Expand Up @@ -588,13 +588,13 @@ func (s *server) Stop(ctx context.Context, req *tfplugin5.Stop_Request) (*tfplug
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.StopProviderRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.StopProvider(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
Expand All @@ -603,7 +603,7 @@ func (s *server) Stop(ctx context.Context, req *tfplugin5.Stop_Request) (*tfplug
logging.ProtocolTrace(ctx, "Closed all our contexts")
ret, err := toproto.Stop_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand All @@ -619,20 +619,20 @@ func (s *server) ValidateDataSourceConfig(ctx context.Context, req *tfplugin5.Va
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.ValidateDataSourceConfigRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", r.Config)
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.ValidateDataSourceConfig(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
ret, err := toproto.ValidateDataSourceConfig_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand All @@ -648,22 +648,22 @@ func (s *server) ReadDataSource(ctx context.Context, req *tfplugin5.ReadDataSour
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.ReadDataSourceRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", r.Config)
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "ProviderMeta", r.ProviderMeta)
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.ReadDataSource(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Response", "State", resp.State)
ret, err := toproto.ReadDataSource_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand All @@ -679,20 +679,20 @@ func (s *server) ValidateResourceTypeConfig(ctx context.Context, req *tfplugin5.
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.ValidateResourceTypeConfigRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", r.Config)
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.ValidateResourceTypeConfig(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
ret, err := toproto.ValidateResourceTypeConfig_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand All @@ -708,20 +708,20 @@ func (s *server) UpgradeResourceState(ctx context.Context, req *tfplugin5.Upgrad
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.UpgradeResourceStateRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.UpgradeResourceState(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Response", "UpgradedState", resp.UpgradedState)
ret, err := toproto.UpgradeResourceState_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand All @@ -737,22 +737,22 @@ func (s *server) ReadResource(ctx context.Context, req *tfplugin5.ReadResource_R
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.ReadResourceRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "CurrentState", r.CurrentState)
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "ProviderMeta", r.ProviderMeta)
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.ReadResource(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Response", "NewState", resp.NewState)
ret, err := toproto.ReadResource_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand All @@ -768,7 +768,7 @@ func (s *server) PlanResourceChange(ctx context.Context, req *tfplugin5.PlanReso
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.PlanResourceChangeRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", r.Config)
Expand All @@ -778,14 +778,14 @@ func (s *server) PlanResourceChange(ctx context.Context, req *tfplugin5.PlanReso
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.PlanResourceChange(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Response", "PlannedState", resp.PlannedState)
ret, err := toproto.PlanResourceChange_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand All @@ -801,7 +801,7 @@ func (s *server) ApplyResourceChange(ctx context.Context, req *tfplugin5.ApplyRe
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.ApplyResourceChangeRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", r.Config)
Expand All @@ -811,14 +811,14 @@ func (s *server) ApplyResourceChange(ctx context.Context, req *tfplugin5.ApplyRe
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.ApplyResourceChange(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Response", "NewState", resp.NewState)
ret, err := toproto.ApplyResourceChange_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand All @@ -834,13 +834,13 @@ func (s *server) ImportResourceState(ctx context.Context, req *tfplugin5.ImportR
defer logging.ProtocolTrace(ctx, "Served request")
r, err := fromproto.ImportResourceStateRequest(req)
if err != nil {
logging.ProtocolError(ctx, "Error converting request from protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting request from protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Calling downstream")
resp, err := s.downstream.ImportResourceState(ctx, r)
if err != nil {
logging.ProtocolError(ctx, "Error from downstream", "error", err)
logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
return nil, err
}
logging.ProtocolTrace(ctx, "Called downstream")
Expand All @@ -849,7 +849,7 @@ func (s *server) ImportResourceState(ctx context.Context, req *tfplugin5.ImportR
}
ret, err := toproto.ImportResourceState_Response(resp)
if err != nil {
logging.ProtocolError(ctx, "Error converting response to protobuf", "error", err)
logging.ProtocolError(ctx, "Error converting response to protobuf", map[string]interface{}{logging.KeyError: err})
return nil, err
}
return ret, nil
Expand Down
Loading

0 comments on commit 7d4431a

Please sign in to comment.