Open luka5 opened 1 year ago
We've just noticed, that a Npm group repository works as expected. Gladly our upstream Nexus has a Npm group repository including the Npm hosted.
When running the same curl request against the same Nexus with a Header such as If-Modified-Since: Wed, 14 Jun 2023 14:49:05 GMT
, it does return latest version for the Npm group.
Hi @nblair
With the latest Sonatype Nexus Repository OSS 3.60.0-02 we've noticed that we still run into a issues formerly known as NEXUS-23618.
TL;DR A Nexus Npm Proxy Repo can't connect to a Npm Hosted Repo.
We've one Nexus (upstream) with a hosted Npm repository and another one (downstream) with a proxy Npm repository to exactly that hosted Npm repository. Everything works fine, as long as there are no new releases. When there is a newer version of a Npm package in the upstream Nexus, that Nexus does update the attribute
Npm last_modified
but not theContent last_modified
. When requesting the npm package metadata now, the downstream Nexus sends it'sContent last_modified
in theIf-Modified-Since:
header. Since it is not updated in the upstream Nexus, we receive a304 Not Modified
and a404 Not Found
for the actual package in the end. From what we see it would be fixed, if the npm hosted package updates the package metadataContent last_modified
at the moment, when it already updates theNpm last_modified
.In addition, we're a bit confused that there is no way to reset this metadata cache. The only option to solve this right now is to delete the blobs in the blobstore or the blobstore itself. I'd expect the
Invalidate cache
of the Npm proxy repo to remove these files.When debugging this, we also did run the
Create Repair - Reconcile component database from blob store Task
task on the downstream Nexus. As known, it might reset thelast_modified
timestamps to today. That's why - if the other thing is resolved - we would still run into errors here. Maybe it's worth adding a note somewhere.As long as the bug is still in Nexus, what workaround can you think of? We are thinking of deleting and recreating the proxy repository and blobstore daily.
Thank you!