bug-2037435: Add notification command to gcs-cli. - #223
Conversation
d23d949 to
11ab9fc
Compare
11ab9fc to
767ac38
Compare
biancadanforth
left a comment
There was a problem hiding this comment.
It took me a while to figure out how to test this locally, but I finally did. I don't think the obs-common README is very helpful on how to run these CLIs, particularly with the more recent switch to uv.
While we're here, would you mind improving the README slightly?
Here are the steps that ultimately worked for me for the GCS emulator:
just down
just build
just up
uv self update (I was getting some warnings for an unrecognized field in pyproject.toml -- we don't constrain the version of `uv`, but we use the latest version in CI)
uv sync
export STORAGE_EMULATOR_HOST="http://localhost:8001"
uv run gcs-cli create test-bucket
uv run gcs-cli notification test-bucket test-project test-topic-name
Also, how does this connect to the pubsub emulator? Is that going to be done in the Tecken repo? I thought perhaps there may need to be some config for the GCS emulator to send things to the PubSub emulator (or something)...
I can try. I feel a better solution than what we currently have would be a
That's essentially what I did as well (except for the
The GCS emulator uses the normal Go pub/sub client library, which respects the |
6868876 to
58d229b
Compare
For the new Tecken upload API we need Cloud Storage Pub/Sub notifications. We use gcs-cli to set up Cloud Storage buckets in the emulator, so we need to add the ability to configure Pub/Sub notifications to the tool.
The GCS emulator only recently gained the ability to configure Pub/Sub notifications, so we also need to upgrade the emulator to the latest version to make the tests pass.