-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement Delivery Optimization #909
Conversation
#include "Public/AppInstallerStrings.h" | ||
#include "winget/UserSettings.h" | ||
|
||
// Until it is in the Windows SDK, get it from here |
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.
IProgressCallback& progress, | ||
bool computeHash = false); | ||
bool computeHash = false, | ||
std::string_view downloadIdentifier = {}); |
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.
.github/actions/spelling/expect.txt
Outdated
@@ -6,6 +6,7 @@ agg | |||
aicli | |||
AICLIC | |||
ajor | |||
ALLOC |
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.
We should probably put these in allow.txt
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.
The only difference I know of is expect == warning and allow == no warning. But I have never seen these warnings.
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.
You'll see them if an item is no longer used and someone adds an additional misspelling.
Since these are terms, it's reasonable to move them to allow
.
ajor
for instance is a good example of something that should be in expect
. It's there because you're currently using [M]ajor
, but ajor
isn't really a word, so if you rewrite [M]ajor
some other way (or mask it w/ a pattern), you wouldn't want someone else to accidentally write ajor
(as a typo by dropping the m
).
You could for instance change:
// REG_DWORD (ex. 0xMMmmbbbb, M[ajor], m[inor], b[uild]) |
to:
// REG_DWORD (ex. 0xMMmmbbbb, MM: major, mm: minor, bbbb: build)
At which point the bot would tell you it noticed ajor
is no longer present (when it notices someone adding a new unrecognized word, which happens often enough).
IProgressCallback& m_progress; | ||
std::mutex m_statusMutex; | ||
std::condition_variable m_statusCV; | ||
DO_DOWNLOAD_STATUS m_currentStatus{}; |
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.
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.
SetProperty(DODownloadProperty_ContentId, contentId); | ||
} | ||
|
||
void DisplayName(std::string_view displayName) |
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.
SetProperty(DODownloadProperty_CorrelationVector, correlationVector); | ||
} | ||
|
||
void NoProgressTimeoutSeconds(uint32_t noProgressTimeoutSeconds) |
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.
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.
Ah, I see Wait() actually waits indefinitely after the first progress update. Keep in mind DO's default timeouts are 30 minutes for foreground, 3 hours for background.
Are you ok with these defaults?
Initial work on #151
Change
This change adds code to leverage the Delivery Optimization (DO) service to download packages. Only packages are downloaded through DO at this time, as other things that we download do not fit in with the design of DO.
Currently one must still opt-in to using DO via settings, which I used rather than an experimental feature because it makes sense to allow the control long term. Eventually, we will make DO the default value here.
Settings
Two settings are added:
.network.downloader
).network.doProgressTimeoutInSeconds
)Validation
Only manual validation has been done currently, but when we move DO to be the default it will automatically be tested by the E2E tests.
Microsoft Reviewers: Open in CodeFlow