A reference to a record of a spec the workspace does not run raises a bare KeyError

未关闭 适合新手
#175 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
backend

调研方向

从 workspace.py 中的 Workspace._check_reads 开始,追踪 _source_spec 和 _bindings 如何处理 spec 尚未绑定的被引用记录。检查提交错误测试,以及待处理记录的重启路径。完成标准是:提交时报告一个指出参数和缺失 spec 的 SubmitError;重启失败时,issue 允许给出相同原因或拒绝打开。

由索引模型根据 Issue 内容生成。

描述

A request that references a record whose spec the workspace does not run is refused with a bare KeyError, not a SubmitError with a reason:

# workspace A runs DETECTOR and MASKS and persists a detector record.
# workspace B is opened on the same log and store, with MASKS only.
client_b.submit(MASKS, params={'detector': detector.ref('detector'), ...})
# KeyError: SpecId(name='loki-calibrated-detector', version=1)

The lookup is in Workspace._check_reads (workspace.py):

source = self._source_spec(ref, loc, also)
check_fit(self._bindings[source].spec, ref, tp, loc)

The same missing binding has a second effect: a workspace that restarts with pending records of a spec it does not run fails each of them with the reason KeyError: SpecId(...).

Expected: the submit is refused with a SubmitError that names the parameter and says the workspace does not run the spec of the referenced record. For the restart, either the same reason on the failed record, or a refusal to open.

Found while reviewing #174. essapps-batch requires --bind so that the usual way to reach this is closed, but any workspace opened with fewer bindings than its log has specs can reach it.

主要语言
Python
星标
0
派生
1
平均合并
8 小时 48 分钟
30 天内合并 PR
70

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

scipp/essapps 的其他 Issue

查看 scipp/essapps 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。