Stale Relay project-config cache after disabling data scrubbing (Relay 26.8.0)
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 22/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, docker-compose, python
調査の方向性
Start in src/sentry/tasks/relay.py and src/sentry/models/options/project_option.py, tracing how a project scrubbing-settings save calls schedule_invalidate_project_config and how projectconfig_cache is rebuilt from get_project_config. Compare get_datascrubbing_settings(project) with the cached value after saving, and use invalidation.is_debounced plus task logs to see whether the save trigger is missed or an older task overwrites a newer config. Done means root cause identified, fixed, with a regression test.
索引モデルが issue の本文から書いたものです。
説明
Self-Hosted Version
Deployment configured as 26.8.0; Relay image confirmed as 26.8.0. Exact web build version not yet captured (sentry-self-hosted-local).
CPU Architecture
x86_64
Docker Version
28.1.1
Docker Compose Version
v2.35.1
Machine Specification
- My system meets the minimum system requirements of Sentry
Installation Type
Existing Docker Compose deployment; containers created approximately 8 weeks before the incident. Exact installation/upgrade history not captured.
Steps to Reproduce
Observed on an existing Docker Compose deployment on 2026-10-27. This is a single observed incident, not a deterministic reproducer.
- With server-side/default scrubbing enabled, receive events so the project configuration is cached.
- Disable Data Scrubber and Use Default Scrubbers. Verify both organization and project settings are off, with no advanced scrubbing rules. The URL selector $breadcrumb.data.url is also configured as a safe field.
- Reload both settings pages and inspect newly received events.
- Compare get_datascrubbing_settings(project) / get_all_pii_configs(project) with projectconfig_cache.backend.get(project_key.public_key), reading only scrubbing fields.
We found the current generated settings and the cached settings disagreed. We have not yet established why the initial invalidation failed or whether an older task overwrote a newer result.
Expected Result
Saving a real change to the scrubbing settings should automatically rebuild the cached project configuration, and Relay should apply it to subsequent events after its normal refresh.
A targeted manual cache refresh or service restart should not be needed for each configuration change. Historical events are not expected to be restored.
Actual Result
All times below are UTC on 2026-10-27.
- 06:49:02: cached configuration lastFetch timestamp.
- ~06:50: operator disabled scrubbing.
- 08:18:36: a new event occurred; received at 08:18:37. It had 47 breadcrumb URLs replaced with [Filtered], with _meta remarks identifying @password:filter.
- A later server-side comparison showed:
Current generated settings:
scrubData: false
scrubDefaults: false
scrubIpAddresses: false
breadcrumbUrlExempt: true
activeRuleCounts: [0]
Cached configuration for the same project/key:
cacheHit: true
lastFetch: 2026-10-27T06:49:02.592071Z
scrubData: true
scrubDefaults: true
breadcrumbUrlExempt: false
advancedRuleCount: 0
The exemption booleans above mean that excludeFields contains $breadcrumb.data.url; the counts are diagnostic summaries of rule applications, not literal configuration field names.
Workaround and verification:
At 08:32:39, we generated a fresh config using get_project_config(project, project_keys=[key]).to_dict() and wrote only that key using projectconfig_cache.backend.set_many(...). Readback showed scrubData=false, scrubDefaults=false and the URL exemption present. We did not change settings again or restart services.
A new event at 08:36:29 (received 08:36:31), using the same project/key, contained 83 breadcrumb URLs, zero [Filtered] URLs and no redaction remarks. This is a successful sample, not a claim about all subsequent traffic.
Background-task diagnostic:
web, taskbroker, taskscheduler and taskworker were running; web/taskworker were healthy. Relay image was ghcr.io/getsentry/relay:26.8.0; web/taskworker used sentry-self-hosted-local. Client SDK: sentry.javascript.vue 7.120.4.
At 08:39:43, invalidation.is_debounced(...) returned false. We called schedule_invalidate_project_config(project_id=..., trigger="manual-diagnostic", countdown=0). The cached revision changed, with lastFetch=08:39:45.207771Z (~2 seconds later). Thus the asynchronous path worked at test time; this does not explain the earlier stale cache or prove the original UI-save trigger worked.
A bounded log search (last 300 lines/service within 3 hours) found only INFO entries, not an invalidation error. This is incomplete log coverage, not proof of no errors.
Questions:
- Is there a known invalidation/debouncing/race issue matching this behavior?
- Which diagnostics would distinguish a missed UI-save invalidation from a stale task writing an older config?
- Is there a supported project-scoped refresh procedure for this case?
Relevant 26.8.0 source:
https://github.com/getsentry/sentry/blob/26.8.0/src/sentry/tasks/relay.py
https://github.com/getsentry/sentry/blob/26.8.0/src/sentry/models/options/project_option.py
Internal domains, user identifiers, event payloads, DSN values and credentials are omitted.
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