Telemetry error report splits a simulation worker failure between its exception and the recorded copy
维护者通常 2 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 20/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
Read .github/scripts/telemetry_error_issues/records.py, especially primary_records and _primary_preference, then inspect failure_causes.record_failure_cause and its record_exception(handled=True) call. Check how Stage12FailureCause is identified and how fingerprint algorithm 2 relates to issue #4085. Done means the original exception represents a failure when both records exist, while the copy still represents failures when it is the only record.
由索引模型根据 Issue 内容生成。
描述
What happens
When a simulation worker or coordinator fails on the simulation service's newer report path, the service logs two ERROR records for the one failure:
- the original exception, for example
ValueError: No dataset found for year 2033: a log record witherror.typeset, noevent.nameand noerror.handled; - a redacted copy written by
failure_causes.record_failure_causethroughrecord_exception(handled=True): anexception.recordedevent witherror.typeStage12FailureCauseanderror.handledtrue, carrying the original's traceback. A worker's copy often has the original's frames and timestamp to the microsecond.
primary_records in .github/scripts/telemetry_error_issues/records.py keeps one record per failure, and _primary_preference ranks both as exceptions. When the timestamps tie, the record whose fingerprint inputs sort first wins, which is the copy for a ValueError. So one cause splits across two error groups and two issues. On 2026-10-26, policyengine-stage12-uk-worker groups a8e6ee4984a289c0 and 88e59fcf916bc9ff were one cause.
Proposed change
Rank a Stage12FailureCause record after other exceptions and before messages and failed requests, so the original exception represents the failure. A failure with only the copy still uses the copy.
The copy sets no event name or attribute of its own (exception.recorded and error.handled are what the runtime writes for any handled exception), so its class is the only field that tells it apart.
This changes which record represents those failures, so it should ship with fingerprint algorithm 2 (#4085) rather than need another algorithm change.
- 主要语言
- Python
- 星标
- 18
- 派生
- 33
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 56
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine-api 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
PolicyEngine/policyengine-api#4037 ·
维护者通常 2 天内回复
-
难度 1/5 1-3 小时 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
维护者通常 2 天内回复
-
Serve economy reports on the v2 routes and save v2 report and simulation IDs可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 5/5 一周以上 新手友好度 35/100
PolicyEngine/policyengine-api#4107 ·
维护者通常 2 天内回复
-
Drop the unused x and y columns from API v2's UK area impact tables可能已有人在做 @anth-volk 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
PolicyEngine/policyengine-api#4102 ·
维护者通常 2 天内回复
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
Graphify-Labs/graphify#4860 · 1 条评论 ·
维护者通常 1 天内回复
-
:bug: Bug
难度 2/5 1-3 小时 新手友好度 84/100
scikit-image/scikit-image#8377 ·
维护者通常 1 天内回复
-
Ingredient import validation accepts negative nutrient values and NaN可能已有人在做 @LukeSekai 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
wger-project/wger#2564 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
apache/ponymail-foal#351 ·
-
难度 1/5 1 小时以内 新手友好度 68/100
维护者通常 4 天内回复