Skip to content

Conversation

@mitchhs12
Copy link
Contributor

No description provided.

@mitchhs12 mitchhs12 self-assigned this Jan 28, 2026
@mitchhs12
Copy link
Contributor Author

Questions that still need answering:

  1. How frequently should the progress events be emitted?
    • Do we want it per-segment, or block based? or do we want to make it time-based?
  2. Should the event payload match the one I did for jobs/{id}/progress?
  3. What's the minimal viable set of event types?
    • Just sync.progress or do we want the started, progress, completed, and failed lifecycle as well? 
  4. If Kafka is unavailable, what do we want to happen?
    • Do we drop the events silently? Retry perpetually? or fail the job completely / stop the worker entirely?

Copy link
Contributor

@LNSD LNSD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

Comment on lines +106 to +142
## Event Reference

### Event Envelope

All events share a common envelope:

```json
{
"event_id": "uuid-v4",
"event_type": "sync.progress",
"event_version": "1.0",
"timestamp": "2026-01-15T10:30:00Z",
"source": {
"worker_id": "worker-01"
},
"payload": { ... }
}
```

### `sync.progress` Payload

```json
{
"job_id": 12345,
"dataset": {
"namespace": "ethereum",
"name": "mainnet",
"manifest_hash": "2dbf16e8..."
},
"table_name": "blocks",
"progress": {
"start_block": 18900000,
"current_block": 19000000,
"files_count": 100,
"total_size_bytes": 50000000
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Event formats should live in the code. We can keep it here for now, but implementation details (such as code and formats) should live in the code.

@mitchhs12 mitchhs12 merged commit 224327c into main Jan 28, 2026
8 checks passed
@mitchhs12 mitchhs12 deleted the feature/ampd-worker-events-doc branch January 28, 2026 21:19
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.

3 participants