release create sends no project unless --project is set

Offen
#2,534 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
63/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
node.js, typescript
Bereich
cli

Rechercherichtung

Start in packages/cli/src/commands/release/create.ts near the body.projects assignment and read how ReleaseTarget resolves the organization and version. Compare project resolution with lib/resolve-target.ts and the sourcemap upload and issue list commands. Reproduce a plain release create using configured project settings, then verify the request includes the resolved project and that --project still works.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

sentry release create <version> only sends projects when --project is passed. It never falls back to the project the CLI resolves for other commands (SENTRY_PROJECT, .sentryclirc [defaults], DSN detection), so a plain release create most likely gets a 400 from Sentry.

  • packages/cli/src/commands/release/create.ts (~L177) sets body.projects only from flags.project. Its ReleaseTarget resolves only the org and version.
  • No command under packages/cli/src/commands/release/ uses lib/resolve-target.ts, the shared org/project auto-detection that sourcemap upload (resolveOrgAndProject) and issue list use.
  • Sentry's release POST requires projects: ReleaseSerializerWithProjects.projects in getsentry/sentry src/sentry/api/endpoints/organization_releases.py has no required=False.
  • --project is documented as optional, so v3 CI jobs that relied on SENTRY_PROJECT with sentry-cli releases new break after migrating. This also affects the sentry wizard Wrangler deploy script in getsentry/toolkit#2529.
  • Found by reading the code; not yet reproduced against a server.

@BYK: the original intent was likely to auto-detect the project like issue list does.

via @BYK.

--

View Session [Sentry]

Vorherrschende Sprache
TypeScript
Sterne
975
Forks
189
Ø Merge
19 Std. 57 Min.
Gemergte PRs (30 T.)
542

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus getsentry/toolkit

Alle Issues in getsentry/toolkit

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.