mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Revert PRs that introduced propogating contexts (#835)
Co-authored-by: Dmitry Kisler <admin@dkisler.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user