feat: add create-kafka-topic skill#157
Conversation
Adds a skill that provisions a new Kafka topic across the four repos that must agree for a Sentry topic to exist: sentry-kafka-schemas (schema + CODEOWNERS), ops (partitions, per-region overrides, all_topics), sentry (Topic enum + cluster mapping), and getsentry (cellsilo cluster mapping). Opens one PR per repo and reports the four PR links with their merge-order dependencies. Reconciled against the taskworker-ingest-push topic PRs (sentry-kafka-schemas#484, ops#20917, sentry#117135, getsentry#20495). CI handles ops materialized config, so the skill only edits source-of-truth files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Testing the skill surfaced two issues: - getsentry no longer needs a per-topic change. It loads KAFKA_TOPIC_TO_CLUSTER at runtime from the topicctl-generated YAML mounted by ops (getsentry#20512, #20661), so the cellsilo.py edit is obsolete. The skill is now 3 repos, not 4. - Make the "which regions to enable" prompt an explicit blocking gate so it is never inferred from a reference topic. Updates SKILL.md, SPEC.md, and the README description accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The team used for the sentry-kafka-schemas CODEOWNERS entry is now also added as a reviewer (--reviewer) on all three PRs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 4 total unresolved issues (including 3 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f8a349d. Configure here.
New ops regional override files must have a counterpart in the cookiecutter-region template (disabled: true) so newly-created regions get the topic too; Warden's cookiecutter-region-backport check flags the omission. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Instead of deferring the sentry-kafka-schemas pin bump, the ops and sentry PRs now bump to the anticipated next version (latest released patch + 1) so the required change is visible in the diff. The PR body flags the version as anticipated, and for sentry notes that uv.lock's resolved entry must be regenerated with `uv lock` once the release publishes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Enabled regions outside the sibling-derived candidate set are now always given an override file (file set = candidate ∪ user-enabled regions). - Use the full shared_config/kafka/topics/regional_overrides/... path for per-region override files so they're staged by git add. - Clarify the Topic enum member is SCREAMING_SNAKE_CASE while the value is the kebab-case topic name, with a concrete example. - Note the KAFKA_TOPIC_TO_CLUSTER value is "default" today, but to match a sibling family if that ever differs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed the review comments in 6daf901:
|
untitaker
left a comment
There was a problem hiding this comment.
i think the skill should ask a few clarifying questions about whether this really needs a schema change. if this is just another taskbroker or outcomes topic then a few steps can be skipped
Which steps can be skipped? |
|
see getsentry/sentry-kafka-schemas#490 (review) -- this is not how we create taskworker or outcomes topics. we already have a schema definition for those, and sentry-kafka-schemas should not contain infra-specific topics that are not present in self-hosted or elsewhere EDIT: after discussing in slack we did create taskworker topics like that. I do think we should still add a caveat about outcomes |

Adds a
create-kafka-topicskill that provisions a new Kafka topic across the four repos that must all agree for a Sentry topic to exist and deploy:all_topics.yaml, schemas requirement bumpTopicenum +KAFKA_TOPIC_TO_CLUSTER, schemas dependency bumpIt opens one PR per repo and reports the four PR links annotated with their merge-order dependencies (the schemas PR must merge + release before the ops/sentry version bumps).
The steps and file formats were reconciled against the real
taskworker-ingest-pushtopic PRs (sentry-kafka-schemas#484, ops#20917, sentry#117135, getsentry#20495). Per how ops works, CI regenerates the materialized/k8s config (make materialize), so the skill only edits source-of-truth files.Includes the required
SPEC.mdand registration inREADME.md,.claude/settings.json, and theclaude-settings-auditallowlist.🤖 Generated with Claude Code