Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move_artifacts fails for root-level artifacts #39

Open
mgriffin13 opened this issue Jan 11, 2019 · 0 comments
Open

move_artifacts fails for root-level artifacts #39

mgriffin13 opened this issue Jan 11, 2019 · 0 comments

Comments

@mgriffin13
Copy link

I have a repo with root level artifacts, and when I try to run a move_artifacts operation, lavatory crashed with this message:

requests.exceptions.HTTPError: 409 Client Error: Conflict for url: https://artifactory.example/artifactory/api/move/yum-local/./pkgname.rpm?to=/yum-archive/./pkgname.rpm

Artifactory had a more detailed error:

2019-01-11 13:58:48,418 [http-nio-8081-exec-1] [ERROR] (o.a.a.r.CopyMoveHelper:99) - Failed to move from src=yum-local/./pkgname.rpm to target=/yum-archive/./pkgname.rpm: Path element cannot end with a dot: yum-archive/./pkgname.rpm: Path element cannot end with a dot: yum-archive/./pkgname.rpm

I was able to fix the issue with this hack at https://github.com/gogoair/lavatory/blob/master/src/lavatory/utils/artifactory.py#L101

move_url = "{0}/{1}/{2}{3}/{1}/{2}".format(base_endpoint, artifact['path'] if artifact['path'] != '.' else "/", artifact['name'], dest_prefix)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant