Skip to content

update: removed all schema registry stuff#139

Merged
HardMax71 merged 2 commits intomainfrom
fix/fastream-docs
Feb 6, 2026
Merged

update: removed all schema registry stuff#139
HardMax71 merged 2 commits intomainfrom
fix/fastream-docs

Conversation

@HardMax71
Copy link
Owner

@HardMax71 HardMax71 commented Feb 6, 2026


Summary by cubic

Removed Confluent Schema Registry and Avro from the stack and switched Kafka events to JSON via FastStream with Pydantic models. This simplifies infra across local, CI, and Helm, and updates docs to reflect the new approach.

  • Refactors

    • Replaced Avro/Schema Registry with FastStream JSON; domain events are plain Pydantic BaseModel (docs updated across architecture and components).
    • Removed schema-registry service and references from docker-compose, deploy.sh, Kafdrop config, e2e boot action, and stack-tests workflow.
    • Dropped Helm Schema Registry templates, helpers, values, and env vars; kafka-init job now waits only for Kafka.
    • Cleaned configuration docs by removing SCHEMA_REGISTRY_URL and updating diagrams and examples.
  • Migration

    • Helm: upgrade the chart; remove any schemaRegistry values and delete existing schema-registry resources if present.
    • Config: remove SCHEMA_REGISTRY_URL from environment/Secrets; not used anymore.
    • No app code changes required for producers/consumers using FastStream; redeploy to apply infra changes.

Written for commit c8d0a90. Summary will update on new commits.

Summary by CodeRabbit

  • Refactor

    • Removed Schema Registry; events now use JSON serialization with Pydantic and FastStream, and producer/subscriber flow simplified.
  • Chores

    • Updated infrastructure, deployment, Docker Compose, Helm charts, and startup flows to omit Schema Registry and related readiness steps.
  • Documentation

    • Revised architecture, getting-started, operations, and component docs to reflect JSON-based events and the new event lifecycle.
  • Tests

    • Adjusted test guidance and fixtures to align with the simplified producer lifecycle and broker-managed lifecycle.

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

This PR removes the Confluent Schema Registry from infra, CI, Helm charts, and docs; it migrates domain events and producer wiring from Avro/Schema-Registry-based serialization to Pydantic (JSON) with FastStream and relocates UnifiedProducer to backend/app/events/core/producer.py.

Changes

Cohort / File(s) Summary
Infrastructure & Orchestration
docker-compose.yaml, deploy.sh
Removed the schema-registry service and all runtime references; infra startup commands no longer include schema-registry.
CI/CD & GitHub Actions
.github/actions/e2e-boot/action.yml, .github/workflows/stack-tests.yml
Removed schema-registry from E2E pre-warm/start commands, log collection loops, and removed related env var.
Helm Chart Values & Templates
helm/integr8scode/values.yaml, helm/integr8scode/values-prod.yaml, helm/integr8scode/templates/_helpers.tpl, helm/integr8scode/templates/infrastructure/schema-registry.yaml, helm/integr8scode/templates/jobs/kafka-init.yaml, helm/integr8scode/templates/secrets/env-secret.yaml
Deleted Schema Registry config/values, helper template, Helm template for deployment/service, init-container wait step, and secret env var. Kafka init now waits only for Kafka.
Event System Code & Docs
backend/app/domain/events/typed.py, backend/app/events/core/producer.py, docs/architecture/..., docs/components/schema-manager.md, docs/architecture/event-system-design.md, docs/architecture/kafka-topic-architecture.md
Domain events now subclass Pydantic BaseModel instead of AvroBase; UnifiedProducer moved to events/core/producer.py; serialization moved from Avro/Schema Registry to FastStream JSON; documentation updated accordingly.
Operational & Reference Documentation
docs/getting-started.md, docs/operations/*, docs/reference/configuration.md, docs/testing/kafka-test-stability.md
Removed Schema Registry mentions, updated deployment/healthcheck/docs and test fixture guidance (producer construction/yield usage).

Sequence Diagram(s)

sequenceDiagram
    participant Producer as UnifiedProducer<br/>(events/core/producer.py)
    participant Broker as FastStream Broker
    participant Kafka as Kafka Topic
    participant Subscriber as FastStream Subscriber<br/>(events/handlers.py)
    participant Handler as Event Handler

    Producer->>Broker: publish(pydantic_model)
    Note over Broker: Serialize to JSON
    Broker->>Kafka: Send JSON message
    Kafka->>Subscriber: Deliver JSON message
    Note over Subscriber: Deserialize to Pydantic<br/>model (validation)
    Subscriber->>Handler: Call with typed model
    Handler->>Handler: Process event
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 No registry hops upon our stack today,
Pydantic JSON takes Avro's old ballet,
FastStream hums and producers send away,
Events arrive typed, validated, and gay,
Hoppity-hop — new flows for a brighter day!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'update: removed all schema registry stuff' is vague and uses the non-descriptive term 'stuff', failing to clearly communicate the scope and significance of the changes. Replace with a more specific and descriptive title such as 'Remove Confluent Schema Registry and migrate to FastStream JSON serialization' or 'Replace Avro/Schema Registry with FastStream Pydantic models'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/fastream-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 20 files

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@docs/testing/kafka-test-stability.md`:
- Around line 63-67: Update the documentation to remove or reframe the
confluent-kafka/librdkafka race-condition explanation: state that this project
uses aiokafka (aiokafka==0.12.0) with the FastStream backend, and that
UnifiedProducer (constructed with broker, event_repository, logger, settings,
event_metrics) delegates to await self._broker.publish() so the confluent-kafka
producer-init lock is not present nor required; either delete the
confluent-kafka-specific paragraphs or replace them with a short note that
aiokafka/FastStream avoids that race and broker lifecycle is managed externally
so explicit start()/stop() on UnifiedProducer is unnecessary.
🧹 Nitpick comments (1)
docs/operations/cicd.md (1)

180-181: Minor doc accuracy nit: the actual service list differs slightly.

The narrative lists (mongo, redis, kafka, zookeeper), but the actual e2e-boot/action.yml (line 31) also starts shared-ca and zookeeper-certgen. Consider mentioning these for completeness, or adding a brief note that cert-generation services are also included.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2026

@HardMax71 HardMax71 merged commit 7431613 into main Feb 6, 2026
17 checks passed
@HardMax71 HardMax71 deleted the fix/fastream-docs branch February 6, 2026 17:29
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