n3dr: Not able to upload downloaded repository content
What happened: I’m trying to migrate a maven2 repository from a Nexus 3 to another one. Download seems to be fine. But I cannot upload the downloaded repository content to the new one. It fails with the following error:
FATA[0004]/home/runner/work/n3dr/n3dr/cmd/n3dr/upload.go:23 main.glob..func3() HTTPStatusCode: '400'; ResponseMessage: '[{"id":"groupId","message":"Missing required component field 'Group ID'"},{"id":"artifactId","message":"Missing required component field 'Artifact ID'"},{"id":"version","message":"Missing required component field 'Version'"}]'; ErrorMessage: '<nil>'
Though it fails with this error, it uploads the artifact it prints the error for and then fails. That artifact has the following files inside its folder:
xxx-client-5.0.0.jar
xxx-client-5.0.0.module
xxx-client-5.0.0.pom
What you expected to happen: The upload process should complete successfully.
How to reproduce it (as minimally and precisely as possible):
Download the repository content:
n3dr backup -n https://nexus.example.com -r my-maven-releases -u readonly-user -p userPwd --directory-prefix $(pwd)/my-maven-releases
Then upload the content to the repository inside the new nexus instance:
n3dr upload -n https://new-nexus.example.com -u admin -p adminPwd -r my-maven-releases --directory-prefix $(pwd)/my-maven-releases
Anything else we need to know?:
Environment:
- source nexus version: OSS 3.28.1-01
- target nexus version: OSS 3.29.2-02
- n3dr version (use
n3dr -v
): nd3r version refs/tags/6.0.1 (snap version) - OS (e.g:
cat /etc/os-release
): Ubuntu 20.04.2 LTS - Kernel (e.g.
uname -a
): 5.4.0-1037-aws #39-Ubuntu SMP Thu Jan 14 02:56:06 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 20 (8 by maintainers)
Commits related to this issue
- [GH-194] Upload issues. — committed to 030/n3dr by 030 3 years ago
- [GH-194] Upload issues. — committed to 030/n3dr by 030 3 years ago
- [GH-194] Upload issues. — committed to 030/n3dr by 030 3 years ago
- [GH-194] Upload issues. — committed to 030/n3dr by 030 3 years ago
- [GH-194] Upload issues. — committed to 030/n3dr by 030 3 years ago
- [GH-194] Upload issues. — committed to 030/n3dr by 030 3 years ago
- [#194] Update Changelog. — committed to 030/n3dr by 030 3 years ago
- Merge pull request #196 from 030/194-upload-issue [GH-194] Upload issues. — committed to 030/n3dr by 030 3 years ago
- [#194] Allow overwrite of regex to ensure that various artifact types could be uploaded. — committed to 030/n3dr by 030 3 years ago
- [#194] Allow overwrite of regex to ensure that various artifact types could be uploaded. — committed to 030/n3dr by 030 3 years ago
- [#194] Allow overwrite of regex to ensure that various artifact types could be uploaded. — committed to 030/n3dr by 030 3 years ago
- [#194] Allow overwrite of regex to ensure that various artifact types could be uploaded. — committed to 030/n3dr by 030 3 years ago
- [#194] Allow overwrite of regex to ensure that various artifact types could be uploaded. — committed to 030/n3dr by 030 3 years ago
- [#194] Allow overwrite of regex to ensure that various artifact types could be uploaded. — committed to 030/n3dr by 030 3 years ago
- [GH-194] skip errors. — committed to 030/n3dr by 030 3 years ago
- Merge pull request #204 from 030/194-regex-env-variables [#194] Allow overwrite of regex to ensure that various artifact types… — committed to 030/n3dr by 030 3 years ago
- [GH-194] Upload issues. — committed to 030/n3dr by 030 3 years ago
- [#194] Update Changelog. — committed to 030/n3dr by 030 3 years ago
- Merge pull request #196 from 030/194-upload-issue [GH-194] Upload issues. — committed to 030/n3dr by 030 3 years ago
- [GH-194] skip errors. — committed to 030/n3dr by 030 3 years ago
Reported error:
Reproduced error:
@030 - looks like it’s much better now. My upload command has finished and I got only 3 errors like this:
Missing required component field
which are OK in my case (as they’re kind of test/dirty builds)Thank you for this awesome tool! 🚀
😃 My mistake. I placed a binary in /usr/local/bin and that was before the snap in $PATH. I deleted it and now I have the correct version. I’ll try and let you know.
Hi @030 , skip really saves the day, thanks! But I’ve seen many regex related errors. Here is one:
Btw, that last 2 parts of
a.b.c.d-6-abc123
is generated by palantir’s gradle git plugin. 6 denotes the changes after last tag and the last bit is the summary of commit sha.@tunix Could you try 6.0.6 https://github.com/030/n3dr#skiperrors
It’d also be nice if you could add an option to skip errors when a parameter is specified like below:
n3dr upload ... -s ...
There are multiple cases I can think of for this:
There could be a regex mismatch, I will add
proj-client-5.0.0-2-gcac5af6.pom
to the integration test to inspect the issue.