Skip to content
New issue

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

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

Already on GitHub? # to your account

[vcpkg-tool] Http binary caching broken without URL template #39871

Closed
Neumann-A opened this issue Jul 11, 2024 · 3 comments · Fixed by microsoft/vcpkg-tool#1459
Closed

[vcpkg-tool] Http binary caching broken without URL template #39871

Neumann-A opened this issue Jul 11, 2024 · 3 comments · Fixed by microsoft/vcpkg-tool#1459
Assignees
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Comments

@Neumann-A
Copy link
Contributor

[DEBUG] 1007: CreateProcessW(curl --create-dirs -L -w "5ec47b8e-6776-4d70-b9b3-ac2a57bc0a1c%{http_code}\n" -H "Authorization: Bearer <token>" https://ralgarim.jfrog.io/artifactory/vcpkg-general/ -o "E:\vcpkg_folders\various\buildtrees\zlib\x64-windows-release.zip")

https://ralgarim.jfrog.io/artifactory/vcpkg-general/ should be https://ralgarim.jfrog.io/artifactory/vcpkg-general/<binary_package>

CreateProcessW(curl -X PUT -H "Authorization: Bearer <token>" -w "\n9a1db05f-a65d-419b-aa72-037fb4d0672e%{http_code}" https://ralgarim.jfrog.io/artifactory/vcpkg-general/ -T "E:\vcpkg_folders\various\packages\zlib_x64-windows-release.zip")

zlib_x64-windows-release.zip should maybe be "E:\vcpkg_folders\various\packages\zlib<triplet><hash>.zip". It should at least contain the somehow like the file binary cache.

cc @ras0219-msft @BillyONeal @JavierMatosD

@Neumann-A
Copy link
Contributor Author

Maybe a usage issue. It works with:

https://ralgarim.jfrog.io/artifactory/vcpkg-general/{name}/{version}/{sha}

but

https://ralgarim.jfrog.io/artifactory/vcpkg-general/

does not work. Maybe it should be mentioned in the docs that the URL template is mandatory. (or at least it should error early.)

@Neumann-A Neumann-A changed the title [vcpkg-tool] Http binary caching broken [vcpkg-tool] Http binary caching broken without URL template Jul 11, 2024
@jimwang118 jimwang118 added the category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) label Jul 12, 2024
@BillyONeal
Copy link
Member

What configuration did you use?

'plain HTTP' needing extra funny configuration is expected because there is no standard protocol being followed

@Neumann-A
Copy link
Contributor Author

What configuration did you use?

I used http,https://cache.example.com/,readwrite,Authorization: Bearer <BearerTokenValue> and I expected it to behave like the file backend which would be equivalent to http,https://cache.example.com/{sha}.zip,readwrite,Authorization: Bearer BearerTokenValue however I got http,https://cache.example.com/{name}_{triplet}.zip,readwrite,Authorization: Bearer BearerTokenValue + a broken lookup. So using http,https://cache.example.com/{name}_{triplet}.zip,readwrite,Authorization: Bearer BearerTokenValue` directly would make the binary caching maybe work?

'plain HTTP' needing extra funny configuration is expected because there is no standard protocol being followed

No template is given I expect it to behave like the normal file backend. However that is not the case, storing works however restoring does not.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)
Projects
None yet
3 participants