sentry-rails: excluded_exceptions triggers a Rails deprecation warning for ActionController::InvalidAuthenticityToken
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
在 sentry-rails gem 中 grep Sentry::Rails::IGNORE_DEFAULT,找到默认排除列表,然后阅读 Sentry::Configuration#excluded_exception_classes,它通过 Object.const_get 解析每个名称。改动是:当 ActionController::InvalidCrossOriginRequest 已存在且已定义时,不再列出 ActionController::InvalidAuthenticityToken,这样这个已弃用的常量就永远不会被解析。完成的标准是:在 Rails main 下捕获异常且没有 DEPRECATION WARNING,同时现有的 configuration specs 仍然通过。
由索引模型根据 Issue 内容生成。
描述
Rails main (8.2) deprecates ActionController::InvalidAuthenticityToken in favour of ActionController::InvalidCrossOriginRequest (release notes). The old name is now a deprecated constant that warns when it is resolved.
Sentry::Rails::IGNORE_DEFAULT still lists "ActionController::InvalidAuthenticityToken", and Sentry::Configuration#excluded_exception_classes resolves every name with Object.const_get. So the first exception that Sentry captures in each process prints:
DEPRECATION WARNING: ActionController::InvalidAuthenticityToken has been deprecated and will be removed in Rails 9.0. Use ActionController::InvalidCrossOriginRequest instead.
Versions: sentry-ruby / sentry-rails 7.2.0 (7.3.0 has the same list), Rails main.
Suggested fix: leave "ActionController::InvalidAuthenticityToken" out of the default list when ActionController::InvalidCrossOriginRequest is defined, because the list already holds that name and the old name refers to the same class.
Workaround:
Sentry::Configuration.after(:initialize) do
excluded_exceptions.delete("ActionController::InvalidAuthenticityToken")
end
- 主要语言
- Ruby
- 星标
- 990
- 派生
- 553
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 31
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/sentry-ruby 的其他 Issue
-
Shorter rate limit in the same header replaces a longer one可能已有人在做 @sentry-junior 于 5 天前认领。 未关闭Bug Ruby
难度 2/5 1-3 小时 新手友好度 76/100
getsentry/sentry-ruby#3211 · 1 条评论 ·
维护者通常 1 天内回复
-
Events dropped client-side for size are only logged at debug level and not recorded as lost可能已有人在做 @sentry-junior 于 5 天前认领。 未关闭Bug Junior: repro Ruby
难度 2/5 1-3 小时 新手友好度 76/100
getsentry/sentry-ruby#3209 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Ship fewer files with the gems可能已有人在做 @solnic 于 1 天前认领。 未关闭Improvement Ruby Waiting for: Product Owner
getsentry/sentry-ruby#3223 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
active_job breaking change Next Major sentry-delayed_job sentry-rails sentry-resque sentry-sidekiq
难度 4/5 3-5 天 新手友好度 48/100
getsentry/sentry-ruby#3222 · 1 条评论 ·
维护者通常 1 天内回复
-
Feature Ruby Waiting for: Product Owner
难度 3/5 1-2 天 新手友好度 54/100
getsentry/sentry-ruby#3217 · 1 条评论 ·
维护者通常 1 天内回复
查看 getsentry/sentry-ruby 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
開発用DockerイメージにPlaywrightのシステム依存を追加する可能已有人在做 @momocus 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
sakazuki-org/sakazuki#1453 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 76/100
jenkins-infra/jenkins.io#9615 · 1 条评论 ·
维护者通常 1 天内回复
-
fix(ocr): compile the Tesseract-free pipeline with Tokio runtime可能已有人在做 @Goldziher 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复