project create: platform names from registry are unreliable, need client-side validation
まだ誰も着手していません。
評価
- 難易度
- 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分
- マージ済み PR(30日)
- 103
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
blocklist removal
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MetaMask/eth-phishing-detect#296544 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pastelsky/bundlephobia#1122 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100