Publishing an existing version returns 201 and keeps the original tarball

Abierto
#436 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@amaliazebi-eng ya está trabajando en esto.

Desde el 5/10/2026.

  • #437 de @amaliazebi-eng — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
api

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
15
Forks
27
Merge medio
22 h 44 min
PR fusionados (30 d)
8

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pulp/pulp_npm

Todos los issues de pulp/pulp_npm

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.