project create: platform names from registry are unreliable, need client-side validation
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- cli
Research direction
Start at the project create command and trace how its platform string is passed to the API. Compare the valid identifiers in src/sentry/models/project.py, src/sentry/utils/platform_categories.py, and static/app/data/platformCategories.tsx; done means invalid names fail locally with a helpful error and similar-platform suggestions instead of an API round-trip.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 121
- Forks
- 14
- Avg merge
- 22h 3m
- Merged PRs (30d)
- 94
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
bug jared
-
jared
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fil-donadoni/tolaria#4409 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
corsairdev/corsair#1764 ·