pulumi/pkg/backend/filestate
Abhinav Gupta 34961a6a29
pkg/filestate: Plumb context
The filestate backend implementation drops context in many places
instead opting to use context.TODO.
context.TODO is a TODO--something intended to be addressed.
context.Backgruond is appropriate for process-scoped operations.

In this case, we can resolve the issues and drop all uses of
context.TODO by plumbing the received contexts appropriately.

For localSnapshotPersister, we add a new `ctx` field
because the interface doesn't yet accept a context argument.
This is tracked in #12594.

Result:

```
% rg context.TODO pkg/backend/filestate
[empty]
```

Resolves #12594
2023-04-10 15:53:32 -07:00
..
backend.go pkg/filestate: Plumb context 2023-04-10 15:53:32 -07:00
backend_legacy_test.go pkg/filestate: Plumb context 2023-04-10 15:53:32 -07:00
backend_test.go pkg/filestate: Plumb context 2023-04-10 15:53:32 -07:00
bucket.go pkg/filestate: Plumb context 2023-04-10 15:53:32 -07:00
bucket_test.go pkg/filestate: Plumb context 2023-04-10 15:53:32 -07:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
lock.go pkg/filestate: Plumb context 2023-04-10 15:53:32 -07:00
meta.go refactor(filestate): Don't use t.Setenv in tests 2023-03-31 16:29:06 -07:00
meta_test.go refactor(filestate): Don't use t.Setenv in tests 2023-03-31 16:29:06 -07:00
snapshot.go pkg/filestate: Plumb context 2023-04-10 15:53:32 -07:00
stack.go filestate/internal: Use stack reference, not name 2023-03-16 14:44:33 -07:00
state.go pkg/filestate: Plumb context 2023-04-10 15:53:32 -07:00
state_test.go filestate: Re-add project support 2023-03-31 13:21:36 -07:00
store.go pkg/filestate: Plumb context 2023-04-10 15:53:32 -07:00
store_test.go pkg/filestate: Plumb context 2023-04-10 15:53:32 -07:00