environments/state: detached HEAD returns 409, so environments can't be listed at a tag or commit
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with pkg/api/environment_state.go, especially environmentGitState at lines 122–124, and trace how detached HEAD state becomes ENVIRONMENT_REVISION_CONFLICT. Check the existing environment state tests and the app contract described in the issue. Done means the endpoint returns state with canWriteOrder and canCreateEnvironment false and a reason for detached HEAD, while still allowing environments to be listed.
由索引模型根据 Issue 内容生成。
描述
Bug. GET /datatug/environments/state answers 409 ENVIRONMENT_REVISION_CONFLICT for any project checked out at a detached HEAD (environmentGitState, pkg/api/environment_state.go:122-124, v0.113.0).
Effect for users. Someone serving a project at a tag or a specific commit can't list environments at all. The DataTug app's Environments page shows "Could not load environments. Refresh to try again." Refreshing never helps.
Expected. A read should never fail because of the checkout state. Return the state read-only: canWriteOrder: false and canCreateEnvironment: false, with a reason such as "This project is checked out at a commit, not a branch". The app already shows those reasons (datatug-apps branch env-contract-gate).
Found by the datatug-apps journey e2e. Its pinned demo checkout is detached, and CI now works around this with git switch -c demo-agent.
🤖 Generated with Claude Code
- 主要语言
- Go
- 星标
- 1
- 派生
- 0
- 平均合并
- 7 小时 18 分钟
- 30 天内合并 PR
- 181
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
datatug/datatug-cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
datatug/datatug-cli#261 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
datatug/datatug-cli#256 ·
维护者通常 1 天内回复
-
Handle dal.IsNullCondition (isNull / isNotNull) in chat joins, access policies and compare-facts未关闭
难度 4/5 3-5 天 新手友好度 55/100
datatug/datatug-cli#316 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 57/100
datatug/datatug-cli#262 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
datatug/datatug-cli#247 ·
维护者通常 1 天内回复
查看 datatug/datatug-cli 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
google/go-containerregistry#2491 ·
维护者通常 1 天内回复
-
aiac enhancement
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
phase:v1 type:harness
难度 2/5 1-3 小时 新手友好度 70/100
scttfrdmn/burroughs#1181 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
compiler-explorer/ce-ci#28 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复