-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[browser] Allow download retry+throttling in unified code with blazor #88910
Conversation
Tagging subscribers to 'arch-wasm': @lewing Issue Details
|
Does this fix the issue seen in #88505 (comment) ? |
src/mono/wasm/Wasm.Build.Tests/TestAppScenarios/DownloadResourceProgressTests.cs
Outdated
Show resolved
Hide resolved
src/mono/wasm/Wasm.Build.Tests/TestAppScenarios/DownloadResourceProgressTests.cs
Outdated
Show resolved
Hide resolved
Yes, it does |
Would it be possible to add some test to check that? |
That is the case with |
src/mono/wasm/Wasm.Build.Tests/TestAppScenarios/DownloadResourceProgressTests.cs
Outdated
Show resolved
Hide resolved
…rSdk # Conflicts: # eng/testing/scenarios/BuildWasmAppsJobsList.txt # src/mono/wasm/testassets/WasmBasicTestApp/wwwroot/main.js
…smDownloadRetryForSdk
Failures are unrelated |
testOutput("Throw error instead of downloading resource"); | ||
const error = new Error("Simulating a failed fetch"); | ||
error.silent = true; | ||
throw error; |
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.
Does this get surfaced to the user at all? What behavior does blazor have when we fail to load an assembly at all?
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.
Before this PR, the Blazor aborts on first download failure. Their original approach was to let the user override loadBootResource
do retries by themself. After discussion with @pavelsavara we agreed that turn-on our built-in retry support.
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.
I meant, is this surfaced when even a 3rd retry fails?
[Theory] | ||
[InlineData(false)] | ||
[InlineData(true)] | ||
public async Task DownloadProgressFinishes(bool failAssemblyDownload) |
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.
Maybe rename to indicate that this is testing retries.
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.
(intended) Retry happens only when failAssemblyDownload=true
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.
Yeah, and that's what we are testing 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.
We are testing "download progress" counter, one case is with retry and one is without
onDownloadResourceProgress
)DotnetHostBuilder
(unrelated, used in blazor)