Skip to content

Presign externalized payloads via data_index_key#79

Merged
elffjs merged 2 commits into
mainfrom
data-index-key
Apr 28, 2026
Merged

Presign externalized payloads via data_index_key#79
elffjs merged 2 commits into
mainfrom
data-index-key

Conversation

@elffjs

@elffjs elffjs commented Apr 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Adopt cloudevent v0.2.8 (Add data_index_key cloudevent#53), which adds a data_index_key ClickHouse column carrying the blob-bucket key for events whose payload was split out of the inline event.
  • Switch the GraphQL presign trigger from the cloudevent/blobs/ key-prefix check to data_index_key != "", and presign that key against a new BLOB_BUCKET setting instead of the parquet bucket.
  • For externalized events, eventrepo.GetCloudEventFromIndex now returns header-only — the GraphQL resolver fills in dataUrl. This is a contract change, but per the cloudevent PR description no one was using the old prefix-based path.

Notes

  • New setting BLOB_BUCKET added to internal/config/settings.go, settings.sample.yaml, and both Helm values files (defaulting to the same dimo-storage-{dev,prod} bucket dis writes to).
  • gRPC ObjectInfo proto is unchanged for now — it does not surface data_index_key, so gRPC consumers of externalized events get header-only responses with no dataUrl field. Happy to add it in a follow-up if needed.
  • parquet.SeekToRow / pr.SeekToRow now return cloudevent.StoredEvent; we unwrap to RawEvent for existing callers, so behavior is preserved for non-externalized events.

Test plan

  • go vet ./...
  • go test -count=1 -short ./... (incl. ClickHouse-backed integration tests)
  • Manually verify GraphQL latestCloudEvent / cloudEvents returns dataUrl for an event with a non-empty data_index_key and inline data otherwise

🤖 Generated with Claude Code

Adopt cloudevent v0.2.8: events whose payload was split into the blob
bucket carry a data_index_key column in ClickHouse. Switch the GraphQL
presign trigger from the cloudevent/blobs/ key prefix to a non-empty
data_index_key, and presign that key against a new BLOB_BUCKET setting
instead of the parquet bucket.

CloudEvent responses for externalized events are now header-only at the
eventrepo layer (the GraphQL resolver fills in dataUrl); other paths
remain unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@elffjs
elffjs requested a review from zer0stars April 28, 2026 13:28
@elffjs

elffjs commented Apr 28, 2026

Copy link
Copy Markdown
Member Author

Need to make these damned buckets.

@elffjs
elffjs merged commit fd0ae2a into main Apr 28, 2026
4 checks passed
@elffjs
elffjs deleted the data-index-key branch April 28, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant