dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.8k stars 450 forks source link

ResourceLoggerForwarderService - duplicate messages #4918

Closed radical closed 4 days ago

radical commented 3 months ago

Failing test Aspire.Hosting.Testing.Tests.ResourceLoggerForwarderServiceTests.ResourceLogsAreForwardedToHostLogging

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=742178 Build error leg or test failing: Aspire.Hosting.Testing.Tests.ResourceLoggerForwarderServiceTests.ResourceLogsAreForwardedToHostLogging Pull request: https://github.com/dotnet/aspire/pull/4915

  Aspire.Hosting.Testing.Tests.ResourceLoggerForwarderServiceTests.ResourceLogsAreForwardedToHostLogging [FAIL]
    Assert.Collection() Failure
    Collection: [[50:37.314,  info] 1: Test trace message, [50:37.368,  info] 1: Test trace message, [50:37.369,  info] 2: Test debug message, [50:37.369,  info] 3: Test information message, [50:37.369,  info] 4: Test warning message, ...]
    Expected item count: 6
    Actual item count:   7
    Stack Trace:
      /_/tests/Aspire.Hosting.Testing.Tests/ResourceLoggerForwarderServiceTests.cs(120,0): at Aspire.Hosting.Testing.Tests.ResourceLoggerForwarderServiceTests.ResourceLogsAreForwardedToHostLogging()
      --- End of stack trace from previous location ---
    Output:
      | [2024-07-15T23:50:37] TestApp.AppHost.Resources.myresource Information: 1: Test trace message
      | [2024-07-15T23:50:37] TestApp.AppHost.Resources.myresource Information: 1: Test trace message
      | [2024-07-15T23:50:37] TestApp.AppHost.Resources.myresource Information: 2: Test debug message
      | [2024-07-15T23:50:37] TestApp.AppHost.Resources.myresource Information: 3: Test information message
      | [2024-07-15T23:50:37] TestApp.AppHost.Resources.myresource Information: 4: Test warning message
      | [2024-07-15T23:50:37] TestApp.AppHost.Resources.myresource Error: 5: Test error message
      | [2024-07-15T23:50:37] TestApp.AppHost.Resources.myresource Error: 6: Test critical message

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "Expected item count: 6",
  "ErrorPattern": "Collection:.*1: Test trace message",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

cc @DamianEdwards

Known issue validation

Build: :mag_right: Result validation: :warning: Validation could not be done without an Azure DevOps build URL on the issue. Please add it to the "Build: :mag_right:" line. Validation performed at: 8/6/2024 7:16:55 AM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0
radical commented 2 months ago

Duplicate messages:

TestApp.AppHost.Resources.myresource Information: 1: Test trace message
TestApp.AppHost.Resources.myresource Information: 1: Test trace message
TestApp.AppHost.Resources.myresource Information: 2: Test debug message
...

cc @mitchdenny

mitchdenny commented 2 months ago

Running some iterations locally to see if I can make this fail.

radical commented 1 month ago

There haven't been any hits here. But that could be due to the duplicated messages not matching the error pattern we used here.

radical commented 6 days ago

@mitchdenny should this be closed?

mitchdenny commented 4 days ago

I haven't seen it for a while. I think we can close. We can always reopen if we spot it again.