Skip to content
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

[Static Web Assets] Fix relative path matching #45039

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Fix relative path matching

17126a8
Select commit
Loading
Failed to load commit list.
Draft

[Static Web Assets] Fix relative path matching #45039

Fix relative path matching
17126a8
Select commit
Loading
Failed to load commit list.
Build Analysis / Build Analysis failed Nov 22, 2024 in 0s

.NET Result Analysis

Details

Tip

To unconditionally bypass the build analysis check (turn it green), you can use the escape mechanism feature. The completion time may vary, potentially taking several minutes, depending on the build analysis workload at the moment.

Test Failures (317 tests failed)

🔹 [All failing tests from dotnet-sdk-public-ci]

    ⚠️ 312 failing tests not displayed for this pipeline due to space limitations

    Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_HostedAppWithScopedCss_VisualStudio [Console] [Details] [Artifacts] [0.80% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configurations (2)

    Exception Message
    System.IO.DirectoryNotFoundException : Could not find a part of the path '/private/tmp/helix/working/B12709CF/w/B0F109B5/e/testExecutionDirectory/AoT_Publish_H---E44E9AE0/blazorhosted/bin/Release/net10.0/publish/wwwroot/_content/RazorClassLibrary/wwwroot'.
    CallStack
       at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
       at System.IO.Enumeration.FileSystemEnumerator`1.Init()
       at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
       at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
       at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
       at System.IO.DirectoryInfo.EnumerateFiles(String searchPattern, SearchOption searchOption)
       at Microsoft.NET.TestFramework.Assertions.DirectoryInfoAssertions.HaveFile(String expectedFile) in /_/test/Microsoft.NET.TestFramework/Assertions/DirectoryInfoAssertions.cs:line 35
       at Microsoft.NET.TestFramework.Assertions.DirectoryInfoAssertions.HaveFiles(IEnumerable`1 expectedFiles) in /_/test/Microsoft.NET.TestFramework/Assertions/DirectoryInfoAssertions.cs:line 53
       at Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_HostedAppWithScopedCss_VisualStudio() in /_/test/Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests/WasmAoTPublishIntegrationTest.cs:line 155
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
       at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_InRelease_Works [Console] [Details] [Artifacts] [0.80% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configurations (2)

    Exception Message
    System.IO.DirectoryNotFoundException : Could not find a part of the path '/private/tmp/helix/working/B12709CF/w/B0F109B5/e/testExecutionDirectory/AoT_Publish_I---9BC42A2F/blazorwasm/bin/Release/net10.0/publish/wwwroot/_content/RazorClassLibrary/wwwroot'.
    CallStack
       at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
       at System.IO.Enumeration.FileSystemEnumerator`1.Init()
       at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
       at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
       at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
       at System.IO.DirectoryInfo.EnumerateFiles(String searchPattern, SearchOption searchOption)
       at Microsoft.NET.TestFramework.Assertions.DirectoryInfoAssertions.HaveFile(String expectedFile) in /_/test/Microsoft.NET.TestFramework/Assertions/DirectoryInfoAssertions.cs:line 35
       at Microsoft.NET.TestFramework.Assertions.DirectoryInfoAssertions.HaveFiles(IEnumerable`1 expectedFiles) in /_/test/Microsoft.NET.TestFramework/Assertions/DirectoryInfoAssertions.cs:line 53
       at Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_InRelease_Works() in /_/test/Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests/WasmAoTPublishIntegrationTest.cs:line 52
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
       at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    Microsoft.NET.Sdk.BlazorWebAssembly.Tests.BlazorLegacyIntegrationTest60.Publish60Hosted_Works [Console] [Details] [Artifacts] [8.27% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configuration

    Exception Message
    System.Exception : The following expected assets weren't found in the manifest:
        ${ProjectPath}\Client\wwwroot\css\app.css
    

    If the difference in baselines is expected, please re-generate the baselines.
    Start by ensuring you're dogfooding the SDK from the current branch (dotnet --version should be '*.0.0-dev').
    If you're not on the dogfood sdk, from the root of the repository run:
    1. dotnet clean
    2. .\restore.cmd or ./restore.sh
    3. .\build.cmd ./build.sh
    4. .\eng\dogfood.cmd or . ./eng/dogfood.sh

    Then, using the dogfood SDK run the .\src\RazorSdk\update-test-baselines.ps1 script.

    CallStack
       at Microsoft.NET.Sdk.Razor.Tests.StaticWebAssetsBaselineComparer.<CompareAssetCounts>g__ThrowAssetCountMismatchError|7_0(StaticWebAsset[] manifestAssets, StaticWebAsset[] expectedAssets) in /_/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselineComparer.cs:line 241
       at Microsoft.NET.Sdk.Razor.Tests.StaticWebAssetsBaselineComparer.CompareAssetCounts(String group, StaticWebAsset[] manifestAssets, StaticWebAsset[] expectedAssets) in /_/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselineComparer.cs:line 207
       at Microsoft.NET.Sdk.Razor.Tests.StaticWebAssetsBaselineComparer.CompareAssetGroup(String group, StaticWebAsset[] manifestAssets, StaticWebAsset[] expectedAssets) in /_/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselineComparer.cs:line 149
       at Microsoft.NET.Sdk.Razor.Tests.StaticWebAssetsBaselineComparer.AssertManifest(StaticWebAssetsManifest expected, StaticWebAssetsManifest actual) in /_/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselineComparer.cs:line 79
       at Microsoft.NET.Sdk.Razor.Tests.AspNetSdkBaselineTest.AssertManifest(StaticWebAssetsManifest actual, StaticWebAssetsManifest expected, String suffix, String runtimeIdentifier, String name) in /_/test/Microsoft.NET.Sdk.Razor.Tests/AspNetSdkBaselineTest.cs:line 291
       at Microsoft.NET.Sdk.BlazorWebAssembly.Tests.BlazorLegacyIntegrationTest60.Publish60Hosted_Works() in /_/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs:line 88
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
       at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    Microsoft.NET.Sdk.BlazorWebAssembly.Tests.BlazorWasmStaticWebAssetsIntegrationTest.StaticWebAssets_Build_Hosted_Works [Console] [Details] [Artifacts] [5.82% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configurations (4)

    Exception Message
    Expected collection to be empty because the generated manifest should match the expected baseline.
    

    If the difference in baselines is expected, please re-generate the baselines.
    Start by ensuring you're dogfooding the SDK from the current branch (dotnet --version should be '*.0.0-dev').
    If you're not on the dogfood sdk, from the root of the repository run:
    1. dotnet clean
    2. .\restore.cmd or ./restore.sh
    3. .\build.cmd ./build.sh
    4. .\eng\dogfood.cmd or . ./eng/dogfood.sh

    Then, using the dogfood SDK run the .\src\RazorSdk\update-test-baselines.ps1 script.

    , but found {"

    For ${ProjectPath}\razorclasslibrary\wwwroot\wwwroot\exampleJsInterop.js:

    Expected manifest RelativePath of wwwroot/exampleJsInterop.js but found exampleJsInterop.js.

    =================================================="}.

    CallStack
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
       at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
       at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
       at FluentAssertions.Execution.GivenSelector`1.FailWith(String message, Object[] args)
       at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEmpty(String because, Object[] becauseArgs)
       at Microsoft.NET.Sdk.Razor.Tests.StaticWebAssetsBaselineComparer.CompareAssetGroup(String group, StaticWebAsset[] manifestAssets, StaticWebAsset[] expectedAssets) in /_/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselineComparer.cs:line 189
       at Microsoft.NET.Sdk.Razor.Tests.StaticWebAssetsBaselineComparer.AssertManifest(StaticWebAssetsManifest expected, StaticWebAssetsManifest actual) in /_/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselineComparer.cs:line 79
       at Microsoft.NET.Sdk.Razor.Tests.AspNetSdkBaselineTest.AssertManifest(StaticWebAssetsManifest actual, StaticWebAssetsManifest expected, String suffix, String runtimeIdentifier, String name) in /_/test/Microsoft.NET.Sdk.Razor.Tests/AspNetSdkBaselineTest.cs:line 291
       at Microsoft.NET.Sdk.BlazorWebAssembly.Tests.BlazorWasmStaticWebAssetsIntegrationTest.StaticWebAssets_Build_Hosted_Works() in /_/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorWasmStaticWebAssetsIntegrationTest.cs:line 117
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
       at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    Microsoft.NET.Sdk.BlazorWebAssembly.Tests.BlazorWasmStaticWebAssetsIntegrationTest.StaticWebAssets_BuildMinimal_Works [Console] [Details] [Artifacts] [5.82% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configurations (4)

    Exception Message
    System.Exception : The following expected assets weren't found in the manifest:
        ${ProjectPath}\wwwroot\appsettings.development.json
    

    If the difference in baselines is expected, please re-generate the baselines.
    Start by ensuring you're dogfooding the SDK from the current branch (dotnet --version should be '*.0.0-dev').
    If you're not on the dogfood sdk, from the root of the repository run:
    1. dotnet clean
    2. .\restore.cmd or ./restore.sh
    3. .\build.cmd ./build.sh
    4. .\eng\dogfood.cmd or . ./eng/dogfood.sh

    Then, using the dogfood SDK run the .\src\RazorSdk\update-test-baselines.ps1 script.

    CallStack
       at Microsoft.NET.Sdk.Razor.Tests.StaticWebAssetsBaselineComparer.<CompareAssetCounts>g__ThrowAssetCountMismatchError|7_0(StaticWebAsset[] manifestAssets, StaticWebAsset[] expectedAssets) in /_/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselineComparer.cs:line 241
       at Microsoft.NET.Sdk.Razor.Tests.StaticWebAssetsBaselineComparer.CompareAssetCounts(String group, StaticWebAsset[] manifestAssets, StaticWebAsset[] expectedAssets) in /_/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselineComparer.cs:line 207
       at Microsoft.NET.Sdk.Razor.Tests.StaticWebAssetsBaselineComparer.CompareAssetGroup(String group, StaticWebAsset[] manifestAssets, StaticWebAsset[] expectedAssets) in /_/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselineComparer.cs:line 149
       at Microsoft.NET.Sdk.Razor.Tests.StaticWebAssetsBaselineComparer.AssertManifest(StaticWebAssetsManifest expected, StaticWebAssetsManifest actual) in /_/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselineComparer.cs:line 79
       at Microsoft.NET.Sdk.Razor.Tests.AspNetSdkBaselineTest.AssertManifest(StaticWebAssetsManifest actual, StaticWebAssetsManifest expected, String suffix, String runtimeIdentifier, String name) in /_/test/Microsoft.NET.Sdk.Razor.Tests/AspNetSdkBaselineTest.cs:line 291
       at Microsoft.NET.Sdk.BlazorWebAssembly.Tests.BlazorWasmStaticWebAssetsIntegrationTest.StaticWebAssets_BuildMinimal_Works() in /_/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorWasmStaticWebAssetsIntegrationTest.cs:line 40
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
       at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Was this helpful? Yes No