Skip to content

Commit

Permalink
Merge pull request #261 from toastwaffle/log-inuse
Browse files Browse the repository at this point in the history
Add the `inUse` count to SharedProviderScheduler log statements
  • Loading branch information
ulucinar authored Aug 22, 2023
2 parents e620c62 + faca7a3 commit ce56bba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/terraform/provider_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ func (s *SharedProviderScheduler) Start(h ProviderHandle) (InUse, string, error)
return nil, "", tferrors.NewRetryScheduleError(r.invocationCount, s.ttl)
}

logger.Debug("Reusing the provider runner", "invocationCount", r.invocationCount)
logger.Debug("Reusing the provider runner", "invocationCount", r.invocationCount, "inUse", r.inUse)
rc, err := r.Start()
return &providerInUse{
scheduler: s,
handle: h,
}, rc, errors.Wrapf(err, "cannot use already started provider with handle: %s", h)
case r != nil:
logger.Debug("The provider runner has expired. Attempting to stop...", "invocationCount", r.invocationCount)
logger.Debug("The provider runner has expired. Attempting to stop...", "invocationCount", r.invocationCount, "inUse", r.inUse)
if err := r.Stop(); err != nil {
return nil, "", errors.Wrapf(err, "cannot schedule a new shared provider for handle: %s", h)
}
Expand Down

0 comments on commit ce56bba

Please sign in to comment.