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.
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_storenormalises thetrailing 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-servercannot close this. It implements the JSON API(
/storage/v1/b/...) whileobject_storelists over the XML API(
/bucket?list-type=2), and returns 404 there. The usual emulator does not exercise the pathwe use.
What would help: run the existing test against a real bucket and report what happens.
A bucket with a few files under a
docs/prefix is enough, and read-only credentials are allit 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_modifiedcomes back — it is the only source ofdoc_timehere.See
crates/utopia-server/src/object_storage.rs.