Replies: 12 comments
-
Thanks for posting this issue. Could you please provide the simple repro project? And did this error has any error message? |
Beta Was this translation helpful? Give feedback.
-
I have a test repo here, checkout the very first commit for the most minimal version: https://github.com/moritz-h/vcpkg-binarycaching-test/tree/f39c728310cd3617614078baa1b8c2437196c49c The relevant output is
That curl itself returns an error exit code 6 is fine as the host is actually not resolvable in this example, but it should not bubble to the top to become an CMake error stopping the build. The mentioned |
Beta Was this translation helpful? Give feedback.
-
@LilyWangLL Do you need any further information about this bug or can you reproduce it? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply. I will test and confirm this issue soon. |
Beta Was this translation helpful? Give feedback.
-
@LilyWangLL I think the category port-bug is wrong. This is a vcpkg-tool problem using curl, not using the curl port. Also here is an even simpler reproduction example, without manifest mode, just run: |
Beta Was this translation helpful? Give feedback.
-
@moritz-h I use your project https://github.com/moritz-h/vcpkg-binarycaching-test/tree/f39c728310cd3617614078baa1b8c2437196c49c locally, but I only got curl error message: Is this expected behavior? I can't repro the following error:
My configure command: |
Beta Was this translation helpful? Give feedback.
-
@LilyWangLL The curl error is what this issue is about. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply, the error message |
Beta Was this translation helpful? Give feedback.
-
Yes, that is the point what this issue is about. I would argue that it may be better to handle connection errors as cache miss instead of a hard error for the whole build. At the very least an option to allow cache connections to fail would be nice. I see the example you are using running manually ./vcpkg install it kind of makes sense to error because I just can rerun the command without the cache option. But with manifest mode I probably have the caching server setup fixed somewhere in the project config. |
Beta Was this translation helpful? Give feedback.
-
I will turn this issue into a discussion for other user's opinion. |
Beta Was this translation helpful? Give feedback.
-
I fully agree with and support the author's opinion. |
Beta Was this translation helpful? Give feedback.
-
Hello, We hit the exact same issue. The cache in our achitecture is made to be an improvement on build speed. Having a build failure when our cache server is not available is not an option. Also, as said in another comment, if we have different levels of caches, we should not fail when a cache server is missing. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
When using binarycaching with the http backend in manifest mode, any curl error (i.e. server not reachable) immediately fails the whole configure step.
Proposed solution
Handle any curl errors as cache miss, maybe print a warning, but do not error and quit. That a server is temporarily not reachable is not that uncommon, and the build process should not depend of the availability of a cache. If the cache is not reachable just build that package locally as it would happen with a cache miss.
Additionally, vcpkg supports multiple caching backends, so I could theoretically configure multiple cache backends as possible fallback option, but this does not make sense if any single cache backend error stops the build.
Beta Was this translation helpful? Give feedback.
All reactions