bug: meltano state list
fails for the Google Cloud Storage backend if there are files at the root of the bucket
#8425
Labels
Accepting Pull Requests
good first issue
Good for newcomers
kind/Bug
Something isn't working
valuestream/Meltano
Meltano Version
3.3.1
Python Version
NA
Bug scope
CLI (options, error messages, logging, etc.)
Operating System
NA
Description
For example, if the contents of a bucket look like this
then
meltano state list
withstate_backend.uri
set togs://my-bucket/state
will fail with aValueError: not enough values to unpack
inmeltano/src/meltano/core/state_store/filesystem.py
Line 585 in d6997eb
because bucket contents are iterated at the root of the bucket, without considering the configured prefix:
meltano/src/meltano/core/state_store/google.py
Line 129 in d6997eb
The fix probably involves two things:
/
prefix=...
tolist_blobs
We might also want to ensure the prefix doesn't have a leading slash.
PS: https://github.com/dagster-io/dagster/blob/0759886a3a66ad9e5898f7da270056a80602e66c/python_modules/libraries/dagster-gcp/dagster_gcp/gcs/gcs_fake_resource.py#L56 looks like a good example of a dummy client implementation to use for testing.
Code
No response
The text was updated successfully, but these errors were encountered: