Skip to content

Commit

Permalink
dont wait forever revlink warmup, wait 20 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
tphoney committed Dec 16, 2024
1 parent 9bd7af4 commit 885b448
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions cmd/terraform_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,18 @@ func TerraformPlanImpl(ctx context.Context, cmd *cobra.Command, oi sdp.OvermindI
resourceExtractionSpinner.Success()

// wait for the revlink warmup to finish before we update the planned changes
err = revlinkPool.Wait()
if err != nil {
return fmt.Errorf("error waiting for revlink warmup: %w", err)
waitCh := make(chan error, 1)
go func() {
waitCh <- revlinkPool.Wait()
}()

select {
case err = <-waitCh:
if err != nil {
return fmt.Errorf("error waiting for revlink warmup: %w", err)
}
case <-time.After(20 * time.Second):
log.Warn("revlink warmup timed out")
}

///////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 885b448

Please sign in to comment.