Fix double-publish compression error in TestContentPackage - #68085
Fix double-publish compression error in TestContentPackage#68085ilonatommy wants to merge 1 commit into
Conversation
|
Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at. |
There was a problem hiding this comment.
Pull request overview
Extends the existing “skip referenced-project publish assets” pattern used in Components E2E trimmed publishing to TestContentPackage, preventing redundant Static Web Assets publish work that can race when multiple projects publish concurrently.
Changes:
- Adds an MSBuild conditional override for
StaticWebAssetsGetPublishAssetsTargetswhen_SkipReferencedProjectPublishAssets=true. - Introduces a no-op target
_SkipGetPublishAssetsForTrimmedBuildto short-circuit Static Web Assets’ referenced-project publish-assets execution.
| @@ -6,6 +6,13 @@ | |||
| <StaticWebAssetBasePath>_content/TestContentPackage</StaticWebAssetBasePath> | |||
| </PropertyGroup> | |||
|
|
|||
| <PropertyGroup Condition="'$(_SkipReferencedProjectPublishAssets)' == 'true'"> | |||
There was a problem hiding this comment.
Are we sure _SkipReferencedProjectPublishAssets will be set here when we need it to?
There was a problem hiding this comment.
It looks like the issue is that Components.TestServer.csproj references BasicTestApp.csproj and Components.WasmMinimal.csproj, both of which reference this project w/ identical global properties, so there's a race
There was a problem hiding this comment.
Yes, the race is the reason for double publish. As you say, we have something like
Components.TestServer
|___BasicTestApp
| |___TestContentPackage
|___ Components.WasmMinimal
|___TestContentPackage
and when E2ETests.csproj is built we have both: BasicTestApp.csproj
and
Components.TestServerpublish triggered. The first one is missing
_SkipReferencedProjectPublishAssets property, the latter has it set. That's good. That means that one of the publishes will be skipped, the other one won't. That eliminate the race. Do I get it right?
Trying to fix the reported race issue: #61178 (comment). The methodology used is same as in #65675, we just extend it to
TestContentPackageasset.