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

Add additional logging and defenses to artifacts use. #947

Merged
merged 4 commits into from
Mar 13, 2023

Conversation

BillyONeal
Copy link
Member


if (!ec)
auto result_hash = hasher.get_hash();
if (Debug::g_debugging)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this if statement, Debug::print should already check if we are in debug mode.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was done to avoid the cost of the format but that's premature, yes.

@BillyONeal BillyONeal merged commit 2393a00 into microsoft:main Mar 13, 2023
@BillyONeal BillyONeal deleted the more-download-logging branch March 13, 2023 19:01
BillyONeal added a commit to BillyONeal/vcpkg-tool that referenced this pull request Mar 28, 2023
BillyONeal added a commit to BillyONeal/vcpkg-tool that referenced this pull request Mar 28, 2023
BillyONeal added a commit that referenced this pull request Mar 28, 2023
* Fix setting VCPKG_ROOT broken in #947

* Update scripts sha and add release checklist for VS.
@autoantwort
Copy link
Contributor

I don't know if this was intentional but this changed the output from

➜  vcpkg git:(master) ✗ vcpkg x-download test --url=https://github.com/KjellKod/g3log/archive/2.3.tar.gz --sha512=deba3c569dc4b7fc55129b754cd2ba8a9b59f4520014edbbfd316367d7085ac18dd33e354803b4dbe6be982a2e74509d7dc5b36b3b1e0cfcb1033207aaf5c9b2
error: Failed to download from mirror set
error: https://s3.hilton.rwth-aachen.de/assetcache/deba3c569dc4b7fc55129b754cd2ba8a9b59f4520014edbbfd316367d7085ac18dd33e354803b4dbe6be982a2e74509d7dc5b36b3b1e0cfcb1033207aaf5c9b2: curl failed to download with exit code 22
error: File does not have the expected hash:
url: https://github.com/KjellKod/g3log/archive/2.3.tar.gz
File: /Users/leanderSchulten/git_projekte/vcpkg/test.97889.part
Expected hash: deba3c569dc4b7fc55129b754cd2ba8a9b59f4520014edbbfd316367d7085ac18dd33e354803b4dbe6be982a2e74509d7dc5b36b3b1e0cfcb1033207aaf5c9b2
Actual hash: cf88bd604a82dd4cd2d2677bbda6f495f4357157d693125cd0df45f84b1976fc6b9dba9eddb5e9ae105e4fc15665ae37c86e9c02aba93d4bb7ba668c88bfddb9

to

➜  vcpkg git:(master) ✗ vcpkg x-download test --url=https://github.com/KjellKod/g3log/archive/2.3.tar.gz --sha512=deba3c569dc4b7fc55129b754cd2ba8a9b59f4520014edbbfd316367d7085ac18dd33e354803b4dbe6be982a2e74509d7dc5b36b3b1e0cfcb1033207aaf5c9b2
error: Failed to download from mirror set
error: https://s3.hilton.rwth-aachen.de/assetcache/deba3c569dc4b7fc55129b754cd2ba8a9b59f4520014edbbfd316367d7085ac18dd33e354803b4dbe6be982a2e74509d7dc5b36b3b1e0cfcb1033207aaf5c9b2: curl failed to download with exit code 22
 
 
%
 
T
o
t
a
l
 
 
 
 
%
 
R
e
c
e
i
v
e
d
 
%
 
X
f
e
r
d
 
 
A
v
e
r
a
g
e
 
S
p
e
e
d
 
 
 
T
i
m
e
 
 
 
 
T
i
m
e
 
 
 
 
 
T
i
m
e
 
 
C
u
r
r
e
n
t


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
D
l
o
a
d
 
 
U
p
l
o
a
d
 
 
 
T
o
t
a
l
 
 
 
S
p
e
n
t
 
 
 
 
L
e
f
t
 
 
S
p
e
e
d




c
u
r
l
:
 
(
2
2
)
 
T
h
e
 
r
e
q
u
e
s
t
e
d
 
U
R
L
 
r
e
t
u
r
n
e
d
 
e
r
r
o
r
:
 
4
0
4




error: File does not have the expected hash:
url: https://github.com/KjellKod/g3log/archive/2.3.tar.gz
File: /Users/leanderSchulten/git_projekte/vcpkg/test.18445.part
Expected hash: deba3c569dc4b7fc55129b754cd2ba8a9b59f4520014edbbfd316367d7085ac18dd33e354803b4dbe6be982a2e74509d7dc5b36b3b1e0cfcb1033207aaf5c9b2
Actual hash: cf88bd604a82dd4cd2d2677bbda6f495f4357157d693125cd0df45f84b1976fc6b9dba9eddb5e9ae105e4fc15665ae37c86e9c02aba93d4bb7ba668c88bfddb9

which is also shown to use users in case of a hash mismatch.

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

Successfully merging this pull request may close these issues.

[vcpkg] vcpkg-init.cmd returns a non-zero exit code on success
3 participants