-
Notifications
You must be signed in to change notification settings - Fork 985
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
[bug] Header-only packages cannot be uploaded to Conan server #13672
Comments
We assume that this bug is caused by an empty conaninfo.txt, which is empty because a header only package doesn't contain any settings or options. When we add an empty options or settings section to the conaninfo.txt, then the error disappears. |
Hi @tygokf Thanks for your report.
This is a bit surprising. I have just tested launching locally a conan_server (no docker, just I'd tend to think that this could be related to the infra/docker setup. First thing I would try is dropping the shared/mount folders, and using a folder inside the docker image. |
Thank you for your quick response @memsharded After some further investigation we figured out that the use of gunicorn was causing issues. With your suggested way to start the server |
That is interesting, thanks for the feedback @tygokf, it is a bit surprising that gunicorn will cause this specific effect, as in theory using it should be quite transparent to the application layer, no idea what would be happening there to specifically fail at empty If you are concerned about performance, maybe you want to consider using ArtifactoryCE?. It is completely free, and it can be way more performant than conan_server, both in transfer and in storage (and it also has better permissions, web UI, etc.) |
Hi. I have a problem that is likely to be related. For some reason, the Conan client adds the It seems that Gunicorn, which is used as a web server in entrypoint of the docker images, can't handle chunked requests properly - bottlepy/bottle#845 (comment) Below are instructions on how to reproduce the problem and debug it:
|
I've tried the same but using uwsgi instead of gunicorn - results are same. How to reproduce uwsgi way? FROM conanio/conan_server:latest
RUN apk add uwsgi uwsgi-python3 uwsgi-http
ENTRYPOINT uwsgi --plugin python3 --plugin http -w conans.server.server_launcher:app --http 0:9300 --workers 4 Then run with:
Then run points 5, 6, 7 from @jakubgros post |
Hi all, I have had another quick look to Conan codebase, still nothing that I think that could fix this. |
I've created a draft pull request #15036 that is one way to work around this. I'm not sure if you want to add this to conan, as it seems to be the web servers that are at fault, but it's a simple workaround in conan. It fixes the problem by passing an empty string rather than a file handle to |
This is not planned to be workarounded in Conan, it seems an issue in some specific webservers, not Conan, see summary in #15036 (comment). Thanks! |
Looks like @eivindt made a PR to python-requests that fixes that bug. Big kudos @eivindt! When psf/requests#6568 will be merged (and looks like it should be soon). It should be fixed here too. |
The PR is scheduled for requests 2.32, and the Conan |
Environment details
Steps to reproduce
docker_compose.yaml
on line 16/17Defaults are:
C:\tmp\conan_server
andC:\tmp\data
docker build . --tag my-conan-server
docker compose -f docker_compose.yaml up -d
conan remote add my-server http://127.0.0.1:9400
server.conf
inC:\tmp\conan_server
with the providedserver.conf
in this bug reportdocker restart my-conan-server
, such that the new server.conf will be used.git clone https://github.com/conan-io/examples2.git
cd examples2/tutorial/creating_packages/other_packages/header_only
demo
, password:demo
):conan create .
conan upload sum/0.1 -r my-server
Logs
The text was updated successfully, but these errors were encountered: