project create: platform names from registry are unreliable, need client-side validation
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- cli
调研方向
从 project create 命令开始,跟踪其平台字符串如何传递给 API。比较 src/sentry/models/project.py、src/sentry/utils/platform_categories.py 和 static/app/data/platformCategories.tsx 中的有效标识符;完成的标准是:无效名称应在本地失败,并提供有帮助的错误和相似平台建议,而不是往返调用 API。
由索引模型根据 Issue 内容生成。
描述
Problem
@betegon was working on sentry project create and discovered that the platform names from the registry cannot be trusted for our API. The actual source of truth for valid platform identifiers lives in a few places in the sentry backend:
src/sentry/models/project.py(GETTING_STARTED_DOCS_PLATFORMS)src/sentry/utils/platform_categories.pystatic/app/data/platformCategories.tsx
Currently project create sends the platform string straight to the API without validating it. If it's wrong, the API returns a 400 and we show an error after the fact. This is a problem for a couple of reasons:
-
No client-side validation — we waste a round-trip to the API for invalid platforms, and the error we get back isn't very helpful.
-
No "did you mean?" suggestions — users can easily get the platform name slightly wrong (e.g.
javascript-nextinstead ofjavascript-nextjs) and get a generic error with no guidance on the correct name. -
Particularly important for agents — when agents are creating projects (like in
sentry init), client-side validation would let us fail faster and with better error messages instead of relying on the API round-trip. This matters because agents may generate platform names that are close but not exact.
We should copy the valid platform list locally for the command and also suggest similar platforms when the user provides one that doesn't exist.
- 主要语言
- TypeScript
- 星标
- 121
- 派生
- 14
- 平均合并
- 23 小时 54 分钟
- 30 天内合并 PR
- 103
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 65/100
-
bug jared
-
jared
难度 4/5 3-5 天 新手友好度 52/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
mksglu/context-mode#1200 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/claude-code#96687 ·
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
AOSSIE-Org/DebateAI#582 · 2 条评论 ·