Skip to content

Add named mutex to packing TestTemplates project that is used by multiple tests running in parallel#5338

Merged
GangWang01 merged 2 commits intodotnet:mainfrom
GangWang01:pack-mutex
Oct 13, 2022
Merged

Add named mutex to packing TestTemplates project that is used by multiple tests running in parallel#5338
GangWang01 merged 2 commits intodotnet:mainfrom
GangWang01:pack-mutex

Conversation

@GangWang01
Copy link
Member

Problem

#5286

Solution

Add named mutex to prevent concurrent attempts to create same pack for Microsoft.TemplateEngine.TestTemplates.

Checks:

  • Added unit tests
  • Added #nullable enable to all the modified files ?

@GangWang01 GangWang01 marked this pull request as ready for review September 28, 2022 13:11
@GangWang01 GangWang01 requested a review from a team as a code owner September 28, 2022 13:11
Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

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

Thanks for the change!
I have couple of requests for improvements.

Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

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

Looks good!
Thank you!

@GangWang01 GangWang01 merged commit 0db6d0e into dotnet:main Oct 13, 2022
@GangWang01 GangWang01 deleted the pack-mutex branch October 13, 2022 07:45
@vlada-shubina
Copy link
Member

/backport to release/7.0.2xx

@github-actions
Copy link
Contributor

Started backporting to release/7.0.2xx: https://github.com/dotnet/templating/actions/runs/3265116934

@GangWang01
Copy link
Member Author

/backport to release/7.0.1xx

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2022

Started backporting to release/7.0.1xx: https://github.com/dotnet/templating/actions/runs/3598304196

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2022

@GangWang01 backporting to release/7.0.1xx failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Add named mutex to packing TestTemplates project that is used by multiple tests running in parallel
Using index info to reconstruct a base tree...
M	test/Microsoft.TemplateEngine.TestHelper/PackageManager.cs
Falling back to patching base and 3-way merge...
Auto-merging test/Microsoft.TemplateEngine.TestHelper/PackageManager.cs
CONFLICT (content): Merge conflict in test/Microsoft.TemplateEngine.TestHelper/PackageManager.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Add named mutex to packing TestTemplates project that is used by multiple tests running in parallel
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!

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2022

@GangWang01 an error occurred while backporting to release/7.0.1xx, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

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.

3 participants