Make backend.StateMgr accept a context (#780)

Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
This commit is contained in:
Marcin Wyszynski
2023-10-24 15:47:46 +02:00
committed by GitHub
parent f906c4792a
commit a6a54c3777
71 changed files with 534 additions and 268 deletions

View File

@@ -4,6 +4,7 @@
package command
import (
"context"
"fmt"
"io"
"os"
@@ -97,8 +98,10 @@ func (c *StatePushCommand) Run(args []string) int {
return 1
}
ctx := context.TODO()
// Get the state manager for the currently-selected workspace
stateMgr, err := b.StateMgr(workspace)
stateMgr, err := b.StateMgr(ctx, workspace)
if err != nil {
c.Ui.Error(fmt.Sprintf("Failed to load destination state: %s", err))
return 1