Publishing an existing version returns 201 and keeps the original tarball

Aperta
#436 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@amaliazebi-eng ci sta già lavorando.

Dal 5/10/2026.

  • #437 di @amaliazebi-eng — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api

Direzione di ricerca

Start with NpmPublishView.put() and read how it handles IntegrityError for Package and ContentArtifact. Trace what happens when a package name and version already exist, then check the relevant publish tests. Done means a duplicate publish is rejected with a conflict response instead of reporting success while keeping the original tarball.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Issue Triage-Needed

Version
pulpcore 3.119.1, pulp_npm 0.10.1; npm 11.17.0.

Describe the bug
Publishing a name and version that already exist in the repository succeeds, but the uploaded tarball
is discarded and the original is kept. The client reports a successful publish of content the registry
does not serve.

To Reproduce

  1. npm publish @example/[email protected].
  2. Change index.js, keep "version": "1.0.0", and run npm publish again.
  3. Download the 1.0.0 tarball and read package/index.js.

Expected behavior
The second publish is rejected with 403 or 409, as the npm registry does
(You cannot publish over the previously published versions).

Actual behavior
The second publish returns 201 and npm prints + @example/[email protected]. The downloaded tarball holds
the original index.js.

Additional context
NpmPublishView.put() handles the IntegrityError on Package and on ContentArtifact by reusing
the existing rows, and the new artifact is not linked. Returning a conflict there would let CI
pipelines detect a missing version bump.

Lingua principale
Python
Stelle
15
Fork
27
Merge medio
22h 44m
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pulp/pulp_npm

Tutte le issue di pulp/pulp_npm

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.