sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.96k stars 577 forks source link

Import-task tags non-imported assets as imported #329

Open chkpnt opened 10 months ago

chkpnt commented 10 months ago

What problem are you trying to solve? I'm currently evaluating a few pro features and tried to import a previously exported maven repository. If the exported maven repository has the version policy "SNAPSHOT" but the target repository has (accidentally) the version policy "RELEASE", the import (of course) doesn't work. In the log of the import task, you see warnings like "*SYSTEM org.sonatype.nexus.repository.maven.internal.orient.MavenUploadHandler - Version policy mismatch, cannot upload SNAPSHOT content to RELEASE repositories for file ..."

But after fixing the repository, the import task still won't import the assets, as they are falsely tagged as imported (they are listed in the file .nexus/nxrm-import-export-task/<path-to-asset>/imported-files-<uuid>.dat)

Do you have a workaround you are using at present? Delete all imported-files-files: find .nexus/nxrm-import-export-task/ -name 'imported-files*' -delete

What feature or behavior is this required for? To reliable import an exported repository.

How could we solve this issue? (Not knowing is okay!) Only tag the file as imported if the import succeeds.

Tell us about your Nexus Repository deployment: what version, operating system, and database are you using? Official Docker-Image of Nexus 3.63.0 with a Pro License (Trial)

Anything else?

mrprescott commented 10 months ago

That doesn't sound right, thanks for filing that. I'll add this to our triage queue to see if we can replicate it. Is the workaround sufficient for you to get a good sense of the features, or is this a showstopper for you? Are you working with anyone on our sales team, or is this a self-led trial through a download you did yourself?

chkpnt commented 10 months ago

Thanks, I've a good sense about the feature. For me who just did a one-time export and import, the workaround is sufficient. But for those who run the import task on a regular basis, it might be more complicated, as they might need to differentiate between the assets already imported and the failing ones.

No, I've no contact with your sales team, I'm indead on a self-led trial. But I'm fine with that; I'm managing a small instance for which I just look to see if there are features that I don't know I need yet. ;-)