Skip to content

Commit

Permalink
TMP: azure: timeout after 15s
Browse files Browse the repository at this point in the history
  • Loading branch information
jepio committed Aug 8, 2024
1 parent 0e52782 commit 2647b48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion platform/api/azure/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ func (a *API) CreateInstance(name, sshkey, resourceGroup, storageAccount string,
clean()
return nil, err
}
_, err = poller.PollUntilDone(context.TODO(), nil)
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
return &Machine{ID: name}, fmt.Errorf("PollUntilDone: %w", err)
}
Expand Down

0 comments on commit 2647b48

Please sign in to comment.