Skip to content

GCS needs someone with a real bucket to run its test #214

Description

@WaylandYang

The GCS source ships with construction tests only. Nobody has pointed it at a real bucket.

That gap is not theoretical. S3 passed the same construction tests and still had a bug that
broke every bucket anyone had clicked a "new folder" button in: object_store normalises the
trailing slash off a directory marker, so the filter never fired, the GET asked for a key that
does not exist, and the 404 took the whole sync down. Only a live endpoint found it. GCS shares
that fetch path and adds its own builder configuration on top.

fsouza/fake-gcs-server cannot close this. It implements the JSON API
(/storage/v1/b/...) while object_store lists over the XML API
(/bucket?list-type=2), and returns 404 there. The usual emulator does not exercise the path
we use.

What would help: run the existing test against a real bucket and report what happens.

UTOPIA_GCS_TEST_ENDPOINT=https://storage.googleapis.com \
  UTOPIA_GCS_TEST_BUCKET=your-bucket \
  UTOPIA_GCS_TEST_KEY="$(cat service-account.json)" \
  cargo test -p utopia-server object_storage

A bucket with a few files under a docs/ prefix is enough, and read-only credentials are all
it needs. The test only lists and reads.

Worth checking beyond a pass: that a folder created through the Cloud Console is skipped rather
than fetched, and that last_modified comes back — it is the only source of doc_time here.

See crates/utopia-server/src/object_storage.rs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions