Skip to content

Commit 8f89312

Browse files
Rename tfState to state in state_pull.go (#3727)
## Summary This function now returns both states for TF and direct deployments. Rename type to reflect that. Co-authored-by: Claude <[email protected]>
1 parent 5900401 commit 8f89312

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bundle/statemgmt/state_pull.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/databricks/cli/libs/log"
1515
)
1616

17-
type tfState struct {
17+
type state struct {
1818
Serial int64 `json:"serial"`
1919
Lineage string `json:"lineage"`
2020
}
@@ -27,7 +27,7 @@ func (l *statePull) Name() string {
2727
return "statemgmt:state-pull"
2828
}
2929

30-
func (l *statePull) remoteState(ctx context.Context, b *bundle.Bundle) (*tfState, []byte, error) {
30+
func (l *statePull) remoteState(ctx context.Context, b *bundle.Bundle) (*state, []byte, error) {
3131
f, err := l.filerFactory(b)
3232
if err != nil {
3333
return nil, nil, err
@@ -44,7 +44,7 @@ func (l *statePull) remoteState(ctx context.Context, b *bundle.Bundle) (*tfState
4444
return nil, nil, err
4545
}
4646

47-
state := &tfState{}
47+
state := &state{}
4848
err = json.Unmarshal(content, state)
4949
if err != nil {
5050
return nil, nil, err
@@ -53,7 +53,7 @@ func (l *statePull) remoteState(ctx context.Context, b *bundle.Bundle) (*tfState
5353
return state, content, nil
5454
}
5555

56-
func (l *statePull) localState(ctx context.Context, b *bundle.Bundle) (*tfState, error) {
56+
func (l *statePull) localState(ctx context.Context, b *bundle.Bundle) (*state, error) {
5757
path, err := b.StateLocalPath(ctx)
5858
if err != nil {
5959
return nil, err
@@ -64,7 +64,7 @@ func (l *statePull) localState(ctx context.Context, b *bundle.Bundle) (*tfState,
6464
return nil, err
6565
}
6666

67-
state := &tfState{}
67+
state := &state{}
6868
err = json.Unmarshal(content, state)
6969
if err != nil {
7070
return nil, err

0 commit comments

Comments
 (0)