Publishing an existing version returns 201 and keeps the original tarball
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
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
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
npm publish@example/[email protected].- Change
index.js, keep"version": "1.0.0", and runnpm publishagain. - Download the
1.0.0tarball and readpackage/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
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pulp/pulp_npm
-
Support for npm auditAbiertoFeature Triage-Needed
Dificultad 3/5 1-2 días Aptitud para principiantes 50/100
Los mantenedores suelen responder en 1 día
-
Support export and import of npm repositoriesPosiblemente ocupada @vycius la tomó hace 45 días. AbiertoIssue Triage-Needed
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
Issue Triage-Needed
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
pulp/pulp_npm#434 · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Extension of NPM REST API (repo index)Posiblemente ocupada @TenSt la tomó hace 69 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
Todos los issues de pulp/pulp_npm
Issues similares
-
bug bugfix
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
simplify
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
drevendev/Devostasis#158 · 1 comentario ·
-
Elko Super TR: temperature stops updating once the thermostat reports its active sensorPosiblemente ocupada @zigpy-review-bot la tomó hoy. Abiertobot: code audit
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
zigpy/zha-device-handlers#5790 ·
Los mantenedores suelen responder en 1 día
-
source defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
mampfes/hacs_waste_collection_schedule#8269 ·
Los mantenedores suelen responder en 1 día