-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Workflow improvements to increase winget command success rate #648
Conversation
@@ -135,7 +164,8 @@ namespace AppInstaller::CLI::Workflow | |||
} | |||
catch (const winrt::hresult_error& e) | |||
{ | |||
if (e.code() == HRESULT_FROM_WIN32(ERROR_NO_RANGES_PROCESSED)) | |||
if (e.code() == HRESULT_FROM_WIN32(ERROR_NO_RANGES_PROCESSED) || | |||
HRESULT_FACILITY(e.code()) == FACILITY_HTTP) | |||
{ | |||
// Server does not support range request, use download |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
support range request [](start = 35, length = 21)
update comment #Resolved
auto result = context.Reporter.ExecuteWithProgress(std::bind(Repository::OpenSource, sourceName, std::placeholders::_1), true); | ||
source = result.Source; | ||
|
||
for (const auto& s : result.SourcesWithUpdateFailure) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for [](start = 12, length = 3)
add a comment indicating that this is only going to produce a warning but we'll continue with the operation (install/update etc.) #Resolved
// Check download size matches if content length is provided in response header | ||
if (contentLength > 0) | ||
{ | ||
THROW_HR_IF(E_UNEXPECTED, bytesDownloaded != contentLength); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E_UNEXPECTED [](start = 24, length = 12)
let's create a new hresult reflecting the actual error of size mismatch
DOWNLOAD_SIZE_MISMATCH #Resolved
@@ -229,6 +237,8 @@ namespace AppInstaller::Utility | |||
|
|||
aesThread.join(); | |||
|
|||
AICLI_LOG(Core, Info, << "Finished applying motw using IAttachmentExecute. Result: " << hr); | |||
AICLI_LOG(Core, Info, << "Finished applying motw using IAttachmentExecute. Result: " << hr << " AES Save result: " << aesSaveResult); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AES [](start = 104, length = 3)
let's say "Attachment Execution Service" #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change
Validation
Existing tests. Manual verification by installing several apps succeeded.
Microsoft Reviewers: Open in CodeFlow