Pre-existing Issue Alert Rules and Metric Alert Rules silently stop firing after upgrading to 26.7.0+ — never migrated to the Workflow Engine
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
まず workflow_engine/receivers/project_detectors.py と migration 0094_backfill_issue_stream_detector_workflows.py を読み、次に同等の metric-alert migration と、sentry django shell を介した IssueAlertMigrator/dual_write_alert_rule のエントリーポイントを調査します。完了条件は、アップグレード前から存在する Issue Alert Rules と Metric Alert Rules がアップグレード後に移行され、既存のデフォルト Error Monitor がないプロジェクトも含めて、ルールごとの手動対応なしに引き続き発火することです。
索引モデルが issue の本文から書いたものです。
説明
Self-Hosted Version
26.7.1
CPU Architecture
x86_64
Docker Version
N/A
Docker Compose Version
N/A
Machine Specification
- My system meets the minimum system requirements of Sentry
Installation Type
Upgrade from 26.5.0 to 26.7.1
Steps to Reproduce
- Run a self-hosted instance predating the Workflow Engine, with existing Issue Alert Rules and/or Metric Alert Rules on various projects.
- Upgrade to 26.7.0+, which enables the Workflow Engine (getsentry/self-hosted#4364).
- Don't re-create or re-edit any pre-existing alert rules after the upgrade.
- Check the Alerts UI for a project with an untouched pre-existing rule, and check whether that project has a default Error Monitor detector.
Expected Result
Pre-existing Issue Alert Rules and Metric Alert Rules keep firing after the upgrade — either auto-migrated to the new Workflow/Detector model, or still working via the old model as a fallback.
Actual Result
Rule and AlertRule objects are never migrated to the new Workflow/Detector model unless a human creates or edits that specific rule again after the upgrade. No automatic retroactive migration exists:
- The project-creation signal (
workflow_engine/receivers/project_detectors.py) only fires for new projects. - The one backfill migration touching existing data (
workflow_engine/migrations/0094_backfill_issue_stream_detector_workflows.py) only operates on projects that already have an error detector — it can't create a first one. - That migration and the equivalent for metric alerts are marked
is_post_deployment = True, meant to be triggered manually post-deploy per Sentry's own convention. Self-hosted's install/upgrade tooling has no such trigger anywhere.
Impact on our instance (~430 active projects, ~1,300 active alert rules):
- 52 of 1,169 active Issue Alert Rules, across 24 projects, silently unmigrated and dead.
- 5 of 143 active Metric Alert Rules likewise unmigrated and dead.
- 19 of 432 active projects had zero default Error Monitor — blocking even new alert creation, since the UI only attaches alerts to an existing monitor and Error Monitors can't be created manually.
All silent — no error, no log, just an empty alert list.
Workaround: manually invoked IssueAlertMigrator/dual_write_alert_rule per affected rule via sentry django shell, gated on a "not already migrated" check (neither function is idempotent on its own). Worked cleanly for all 57 rules.
Suggested fix: document this in the upgrade guide, or ship an idempotent management command that backfills pre-existing Rule/AlertRule objects post-upgrade. Happy to help shape/test a fix.
Related (different symptoms, same 26.7.0 rollout): #4385, #4105, #4110, #4341, #4044
Event ID
No response
- 主要言語
- Shell
- スター
- 9.7k
- フォーク
- 2k
- 平均マージ
- 3日 2時間
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/self-hosted のほかの issue
-
Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
getsentry/self-hosted#4644 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
getsentry/self-hosted#4518 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Waiting for: Product Owner
難易度 3/5 1〜2日 初心者へのやさしさ 73/100
getsentry/self-hosted#4642 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Waiting for: Community
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
getsentry/self-hosted#4637 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Waiting for: Product Owner
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
getsentry/self-hosted#4634 ·
メンテナーはふだん 2 日以内に返信
getsentry/self-hosted の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ajithakdev/claude-desktop-rpm#43 ·
メンテナーはふだん 1 日以内に返信
-
documentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aws/aws-networking-best-practices#256 ·
メンテナーはふだん 2 日以内に返信
-
area:terraform source:reader type:content-error
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
stephrobert/blog-roadmap#268 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
fossi-foundation/globalfoundries-pdk-libs-gf180mcu_fd_pv#61 ·
-
openai-directory
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100