sonatype-nexus-community / nexus-repository-cargo

Nexus Repository Cargo Format
Eclipse Public License 1.0
69 stars 19 forks source link

Not possible to retrieve artifacts back after multiple versions were published #18

Closed vmax closed 7 months ago

vmax commented 2 years ago

Use the repository after publishing multiple versions of the same artifact

Successful long-term usage of the repo

By uncovering the root cause

Reproducible steps:

  1. Start the repo locally: docker build -t nexus-repository-cargo . then docker run --rm -p 8081:8081 --name nexus-repository-cargo nexus-repository-cargo
  2. Do the initial setup (admin password; configure crate realm; create a repo of type cargo - say, named, crates-snapshot and obtain a token for publishing - by calling /repository/crates-snapshot/token endpoint)
  3. Obtain a Rust crate to publish
  4. cargo publish the crate into local repo
  5. modify the version of the crate to be version + 1 patch
  6. attempt to clone the index git clone http://localhost:8081/repository/crates-snapshot/index
  7. repeat steps 4 to 6 until step 6 fails with 500 server error and the attached stacktrace.log shows up in the Nexus logs