-
Notifications
You must be signed in to change notification settings - Fork 507
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
Removing constraint from templates to avoid SDK multithreading issue #4176
Conversation
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.
Looks good. As long as we aren't expecting customers to install templates directly from dotnet new, which I don't believe is the case. Worse case there is that the created template may not function as intended.
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/aspire/actions/runs/9089407386 |
@joperezr backporting to release/8.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Removing constraint from templates to avoid SDK multithreading issue
Using index info to reconstruct a base tree...
A src/Aspire.ProjectTemplates/templates/aspire-mstest/.template.config/template.json
A src/Aspire.ProjectTemplates/templates/aspire-nunit/.template.config/template.json
M src/Aspire.ProjectTemplates/templates/aspire-starter/.template.config/template.json
M src/Aspire.ProjectTemplates/templates/aspire-xunit/.template.config/template.json
Falling back to patching base and 3-way merge...
Auto-merging src/Aspire.ProjectTemplates/templates/aspire-xunit/.template.config/template.json
CONFLICT (content): Merge conflict in src/Aspire.ProjectTemplates/templates/aspire-xunit/.template.config/template.json
Auto-merging src/Aspire.ProjectTemplates/templates/aspire-starter/.template.config/template.json
CONFLICT (modify/delete): src/Aspire.ProjectTemplates/templates/aspire-nunit/.template.config/template.json deleted in HEAD and modified in Removing constraint from templates to avoid SDK multithreading issue. Version Removing constraint from templates to avoid SDK multithreading issue of src/Aspire.ProjectTemplates/templates/aspire-nunit/.template.config/template.json left in tree.
CONFLICT (modify/delete): src/Aspire.ProjectTemplates/templates/aspire-mstest/.template.config/template.json deleted in HEAD and modified in Removing constraint from templates to avoid SDK multithreading issue. Version Removing constraint from templates to avoid SDK multithreading issue of src/Aspire.ProjectTemplates/templates/aspire-mstest/.template.config/template.json left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Removing constraint from templates to avoid SDK multithreading issue
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@joperezr an error occurred while backporting to release/8.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
Works around #4145.
@dsplaisted has done a full diagnosis of the issue here, but the TL;DR is that there seems to be a multi-threading issue inside the SDK, particularly in their logic that tries to check for installed workloads. Aspire templates today have a constraint to show these templates only when the aspire workload is installed, which is technically unrequired as the templates get installed via the workload anyway. By adding this constraint, we are forcing the piece of code in the SDK with the race condition, which will make it so that around 50% of the time, aspire template creation will fail. The SDK team will fix this bug in servicing, but in the meantime we are working around the bug by removing the unnecessary constraint from our templates.
We expect a lot of people will hit this issue (essentially anyone creating aspire projects from the command line), so we'll want to service this to 8.0.1 release. (FYI: @danmoseley )
cc: @DamianEdwards @phenning
Microsoft Reviewers: Open in CodeFlow