question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Conan uploading invalid packages to Artifactory

See original GitHub issue

Recently we noticed that corrupted packages started appearing in our Artifactory server. This happens when compressing of package fails and later attempt of uploading the same package sees that .tgz already exists (although broken) and uploads it.

The compression of package can fail due to multiple reasons, such as power failure during compression or due to a CI job being killed.

However, with conan v1.18 (we currently use 1.18.5, still haven’t updated to v1.19.0), we also noticed following errors during compression that apparently happen at random:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/conans/client/command.py", line 1859, in run
    method(args[0][1:])
  File "/usr/local/lib/python3.7/site-packages/conans/client/command.py", line 1370, in upload
    retry_wait=args.retry_wait, integrity_check=args.check)
  File "/usr/local/lib/python3.7/site-packages/conans/client/conan_api.py", line 78, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/conans/client/conan_api.py", line 918, in upload
    retry, retry_wait, integrity_check, policy, query=query)
  File "/usr/local/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 89, in upload
    integrity_check, policy, remote, upload_recorder, remotes)
  File "/usr/local/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 202, in _upload_ref
    integrity_check, policy, p_remote)
  File "/usr/local/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 268, in _upload_package
    files_to_upload, deleted = self._package_files_to_upload(pref, policy, the_files, p_remote)
  File "/usr/local/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 382, in _package_files_to_upload
    local_manifest = FileTreeManifest.loads(load(the_files["conanmanifest.txt"]))
  File "/usr/local/lib/python3.7/site-packages/conans/model/manifest.py", line 77, in loads
    the_time = int(tokens[0])
ValueError: invalid literal for int() with base 10: ''

ERROR: invalid literal for int() with base 10: ''

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
DoDoENTcommented, Oct 3, 2019

Actually, neither can I reproduce this on my machine. However, the fact is that somehow corrupted packages did appear on our Arfifactory (even when manually downloading the conan_package.tgz I couldn’t decompress it) and we traced that to upload job that happened after power failure in our server room.

Also, the fact is that during I got the above mentioned stack trace on our CI machines while performing compression before upload. However, I didn’t check if .tgz.dirty was there after the crash - I needed to clean the conan cache and manually remove the packages from the Artifactory in order for our other teams to be able to work.

Unfortunately, I don’t have a way to deterministically reproduce this issue (if I had a way, I would definitely describe it in the initial report).

0reactions
danimtbcommented, Nov 27, 2019

Thanks a lot for sharing your experience. I hope no one faces a similar issue like this. Otherwise, we will investigate this further for sure. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conan Repositories
Uploading Packages. To upload packages to your Artifactory local Conan repository use:.
Read more >
Conan fails to upload to Artifactory instance over HTTPS
I tried to repeat the same steps but using http instead of http and all worked fine. What am I doing wrong that...
Read more >
Contributing Packages to Conan-Center
Contributing a library to Conan-Center is really straightforward when you know how to upload your packages to your own Bintray repository.
Read more >
Conan: Server returns wrong message on missing permissions
When a user uploads a package (with same package id) to a conan ... for url: https://rel.besi.com:443/artifactory/api/conan/da-conan-pre-local/v1/files/besi ...
Read more >
Conan packages in the Package Registry - GitLab Docs
Supported CLI commands · conan upload : Upload your recipe and package files to the Package Registry. · conan install : Install a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found