pulumi/pkg/backend
bors[bot] ff7337e87a
Merge #12496
12496: filestate/projectStore: Optimize ListReferences r=abhinav a=abhinav

ListReferences for project layout is currently inefficient.
It roughly does the equivalent of:

    for proj in bucket.List(stacksDir)
        for ref in bucket.List(stacksDir + "/" + proj):
            # ...

This is fine for local, file-based storage,
but super inefficient for S3 or Azure.
The reason this was written as above is because we treat the bucket
as a directory tree in listBucket.

This changes projectStore.ListReferences to use the underlying
bucket.List method directly--without setting the Delimiter.
This treats the bucket as a flat file list instead of a hierarchy,
and we can extract project and stack names from it in one go.


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
2023-04-01 04:22:52 +00:00
..
display Fixed panic in display on terminals with few rows and columns. 2023-03-30 16:16:48 -07:00
filestate Merge #12496 2023-04-01 04:22:52 +00:00
httpstate pkg/backend: Delete SupportsTeams methods 2023-03-29 11:07:58 -07:00
state [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
apply.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
backend.go filestate: Re-add project support 2023-03-31 13:21:36 -07:00
backend_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
errors.go Add a link to docs for the 409 Conflict error message (#3207) 2019-09-10 13:25:08 -07:00
mock.go pkg/backend: Delete SupportsTeams methods 2023-03-29 11:07:58 -07:00
policypack.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
query.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
snapshot.go pkg/backend: Prefer contract.Assertf over Assert 2023-02-21 15:13:16 -08:00
snapshot_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
stack.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
updates.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
watch.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00