Revert PRs that introduced propogating contexts (#835)

Co-authored-by: Dmitry Kisler <admin@dkisler.com>
This commit is contained in:
James Humphries
2023-11-08 21:09:14 +00:00
committed by GitHub
parent 2d6dd8eda8
commit 9c24b6183a
124 changed files with 1131 additions and 1535 deletions

View File

@@ -4,7 +4,6 @@
package command
import (
"context"
"fmt"
"os"
"strings"
@@ -90,9 +89,7 @@ func (c *WorkspaceNewCommand) Run(args []string) int {
// This command will not write state
c.ignoreRemoteVersionConflict(b)
ctx := context.TODO()
workspaces, err := b.Workspaces(ctx)
workspaces, err := b.Workspaces()
if err != nil {
c.Ui.Error(fmt.Sprintf("Failed to get configured named states: %s", err))
return 1
@@ -104,7 +101,7 @@ func (c *WorkspaceNewCommand) Run(args []string) int {
}
}
_, err = b.StateMgr(ctx, workspace)
_, err = b.StateMgr(workspace)
if err != nil {
c.Ui.Error(err.Error())
return 1
@@ -125,7 +122,7 @@ func (c *WorkspaceNewCommand) Run(args []string) int {
}
// load the new Backend state
stateMgr, err := b.StateMgr(ctx, workspace)
stateMgr, err := b.StateMgr(workspace)
if err != nil {
c.Ui.Error(err.Error())
return 1
@@ -163,7 +160,7 @@ func (c *WorkspaceNewCommand) Run(args []string) int {
c.Ui.Error(err.Error())
return 1
}
err = stateMgr.PersistState(ctx, nil)
err = stateMgr.PersistState(nil)
if err != nil {
c.Ui.Error(err.Error())
return 1