Skip to content

feat(demo): add argus-tracker demo with composite keys, batch ingestion, and TimeUUID - #231

Open
fruch with Copilot wants to merge 1 commit into
masterfrom
copilot/demo-argus-style-test-tracker
Open

feat(demo): add argus-tracker demo with composite keys, batch ingestion, and TimeUUID#231
fruch with Copilot wants to merge 1 commit into
masterfrom
copilot/demo-argus-style-test-tracker

Conversation

Copilot AI commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Scaled-down test tracker inspired by scylladb/argus demonstrating complex real-world Cassandra modeling patterns: composite/compound partition keys, TimeUUID clustering, batch ingestion, and partition-scoped queries.

Models (models.py)

  • User — single PK, secondary indexes on username/email/api_token, List[str] roles
  • TestRun — PK: build_id, CK: start_time DESC — "latest run for build X" pattern
  • Event — compound partition (run_id, kind), CK: created_at DESC — "all errors for run X" pattern
  • Notification — PK: receiver, CK: TimeUUID() DESC — chronological feed with sub-ms ordering
class Event(Document):
    run_id: Annotated[UUID, PrimaryKey(partition_key_index=0)]
    kind: Annotated[str, PrimaryKey(partition_key_index=1)]
    created_at: Annotated[datetime, ClusteringKey(order="DESC")]
    metadata: Dict[str, str]  # CQL map<text, text>

Seed pipeline (seed.py)

  • Logged batches for test runs (atomic), unlogged for events/notifications (throughput)
  • Partition-scoped query demo after ingestion — single-partition reads on all three key patterns
  • Prepared-statement caching demonstrated implicitly via coodie's driver cache on repeated inserts
  • Rich CLI output with ARGUS-PRIME panopticon theme

Scaffolding

  • Makefile, pyproject.toml, smoke_test.py following existing demo conventions
  • README.md with model diagrams, batch pattern explanations, query examples
  • demos/README.md updated with argus-tracker entry

Plan: docs/plans/demos-extension-plan.md
Phase: 8

Comment thread demos/argus-tracker/seed.py Fixed
Comment thread demos/argus-tracker/seed.py Fixed
Comment thread demos/argus-tracker/seed.py Fixed
Comment thread demos/argus-tracker/seed.py Fixed
Comment thread demos/argus-tracker/seed.py Fixed
Comment thread demos/argus-tracker/seed.py Fixed
@fruch
fruch marked this pull request as ready for review April 15, 2026 20:27
@fruch
fruch force-pushed the copilot/demo-argus-style-test-tracker branch from 745f5a9 to 33e7b8f Compare April 15, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants