open-telemetry/opentelemetry-dotnet-instrumentation

[Flaky test] IntegrationTests.CustomSdkTests.SubmitsTraces

pjanotti opened this issue · 2 comments

https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/actions/runs/9993685093/job/27622404591#step:9:1197

Error: [xUnit.net 00:08:01.29]     IntegrationTests.CustomSdkTests.SubmitsTraces [FAIL]
  15:17:38 [ERR] [xUnit.net 00:08:01.29]     IntegrationTests.CustomSdkTests.SubmitsTraces [FAIL]
  15:17:38 [DBG] [xUnit.net 00:08:01.29] IntegrationTests: --- FAIL: IntegrationTests.CustomSdkTests.SubmitsTraces() (3.35s)
  15:17:38 [DBG] [xUnit.net 00:08:01.29] IntegrationTests: === RUN   IntegrationTests.StackExchangeRedisTests.SubmitsTraces(2.6.66)
  15:17:38 [DBG]   Failed IntegrationTests.CustomSdkTests.SubmitsTraces [3 s]
  15:17:38 [DBG]   Error Message:
  15:17:38 [DBG]    Expected value to be 0 because Test application exited with non-zero exit code, but found 134 (difference of 134).
  15:17:38 [DBG]   Stack Trace:
  15:17:38 [DBG]      at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
  15:17:38 [DBG]    at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
  15:17:38 [DBG]    at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
  15:17:38 [DBG]    at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
  15:17:38 [DBG]    at IntegrationTests.Helpers.TestHelper.RunTestApplication(TestSettings testSettings) in /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/test/IntegrationTests/Helpers/TestHelper.cs:line 98
  15:17:38 [DBG]    at IntegrationTests.CustomSdkTests.SubmitsTraces() in /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/test/IntegrationTests/CustomSdkTests.cs:line 48
  15:17:38 [DBG]    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
  15:17:38 [DBG]    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  15:17:38 [DBG]   Standard Output Messages:
  15:17:38 [DBG]  Found profiler at /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/bin/tracer-home/linux-arm64/OpenTelemetry.AutoInstrumentation.Native.so.
  15:17:38 [DBG]  Platform: arm64
  15:17:38 [DBG]  Configuration: Release
  15:17:38 [DBG]  TargetFramework: net8.0
  15:17:38 [DBG]  .NET Core: True
  15:17:38 [DBG]  Profiler DLL: /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/bin/tracer-home/linux-arm64/OpenTelemetry.AutoInstrumentation.Native.so
  15:17:38 [DBG]  [TestHttpServer]: Listening on: http://127.0.0.1:38359/v1/traces
  15:17:38 [DBG]  DotnetCLI Starting Application: /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/test/test-applications/integrations/bin/TestApplication.CustomSdk/ARM64/Release/net8.0/TestApplication.CustomSdk.dll
  15:17:38 [DBG]  ProcessName: dotnet
  15:17:38 [DBG]  ProcessId: [1191](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/actions/runs/9993685093/job/27622404591#step:9:1200)9
  15:17:38 [DBG]  Exit Code: 134
  15:17:38 [DBG]  StandardOutput:
  15:17:38 [DBG]  Command line: --redis 44539
  15:17:38 [DBG]  Platform: x64
  15:17:38 [DBG]  Environment variables:
  15:17:38 [DBG]  	COR_ENABLE_PROFILING = 1
  15:17:38 [DBG]  	COR_PROFILER = {918728DD-259F-4A6A-AC2B-B85E1B658318}
  15:17:38 [DBG]  	COR_PROFILER_PATH = /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/bin/tracer-home/linux-arm64/OpenTelemetry.AutoInstrumentation.Native.so
  15:17:38 [DBG]  	CORECLR_ENABLE_PROFILING = 1
  15:17:38 [DBG]  	CORECLR_PROFILER = {918728DD-259F-4A6A-AC2B-B85E1B658318}
  15:17:38 [DBG]  	CORECLR_PROFILER_PATH = /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/bin/tracer-home/linux-arm64/OpenTelemetry.AutoInstrumentation.Native.so
  15:17:38 [DBG]  	DOTNET_ADDITIONAL_DEPS = /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/bin/tracer-home/AdditionalDeps
  15:17:38 [DBG]  	DOTNET_CLI_TELEMETRY_OPTOUT = 1
  15:17:38 [DBG]  	DOTNET_EXE = /home/runner/.dotnet/dotnet
  15:17:38 [DBG]  	DOTNET_HOST_PATH = /home/runner/.dotnet/dotnet
  15:17:38 [DBG]  	DOTNET_INSTALL_DIR = ~/.dotnet
  15:17:38 [DBG]  	DOTNET_NOLOGO = 1
  15:17:38 [DBG]  	DOTNET_ROOT = /home/runner/.dotnet
  15:17:38 [DBG]  	DOTNET_ROOT_ARM64 = /home/runner/.dotnet
  15:17:38 [DBG]  	DOTNET_SHARED_STORE = /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/bin/tracer-home/store
  15:17:38 [DBG]  	DOTNET_STARTUP_HOOKS = /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/bin/tracer-home/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll
  15:17:38 [DBG]  	OTEL_DOTNET_AUTO_HOME = /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/bin/tracer-home
  15:17:38 [DBG]  	OTEL_DOTNET_AUTO_LOG_DIRECTORY = /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/test-artifacts/profiler-logs
  15:17:38 [DBG]  	OTEL_DOTNET_AUTO_SETUP_SDK = false
  15:17:38 [DBG]  	OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES = TestApplication.*
  15:17:38 [DBG]  	OTEL_EXPORTER_OTLP_ENDPOINT = http://localhost:38359
  15:17:38 [DBG]  	OTEL_EXPORTER_OTLP_PROTOCOL = http/protobuf
  15:17:38 [DBG]  	OTEL_LOG_LEVEL = debug
  15:17:38 [DBG]  	OTEL_LOGS_EXPORTER = none
  15:17:38 [DBG]  	OTEL_METRICS_EXPORTER = none
  15:17:38 [DBG]  	OTEL_TRACES_EXPORTER = otlp
  15:17:38 [DBG]  2024-07-18 15:17:36.199 INFO  Logging to '/home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/test/test-applications/integrations/bin/TestApplication.CustomSdk/ARM64/Release/net8.0/' with level Info
  15:17:38 [DBG]  2024-07-18 15:17:36.347 INFO  No valid license could be found. Falling back to trial license with start date '2024-07-18'.
  15:17:38 [DBG]  2024-07-18 15:17:36.985 INFO  TestMessage handled
  15:17:38 [DBG]  2024-07-18 15:17:37.002 INFO  TestMessage handled
  15:17:38 [DBG]  2024-07-18 15:17:37.007 INFO  TestMessage handled
  15:17:38 [DBG]  2024-07-18 15:17:37.010 INFO  TestMessage handled
  15:17:38 [DBG]  2024-07-18 15:17:38.137 INFO  Initiating shutdown.
  15:17:38 [DBG]  2024-07-18 15:17:38.148 INFO  Shutdown complete.
  15:17:38 [DBG]  
  15:17:38 [DBG]  StandardError:
  15:17:38 [DBG]  Unhandled exception. System.Net.Http.HttpRequestException: Response status code does not indicate success: 502 (Bad Gateway).
  15:17:38 [DBG]     at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
  15:17:38 [DBG]     at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
  15:17:38 [DBG]     at TestApplication.CustomSdk.Program.Main(String[] args) in /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/test/test-applications/integrations/TestApplication.CustomSdk/Program.cs:line 77
  15:17:38 [DBG]     at TestApplication.CustomSdk.Program.Main(String[] args) in /home/runner/actions-runner/_work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/test/test-applications/integrations/TestApplication.CustomSdk/Program.cs:line 94
  15:17:38 [DBG]     at TestApplication.CustomSdk.Program.<Main>(String[] args)
  15:17:38 [DBG]  
  15:17:38 [DBG]  [MockSpansCollector]: Shutting down.
  15:17:38 [DBG]  [TestHttpServer]: Shutting down
  15:17:38 [DBG]

SIG: not happen frequently, closing for now.

Same error on different test: https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/actions/runs/10390094077/job/28772236378?pr=3573#step:9:1089

Error: [xUnit.net 00:06:12.03]     IntegrationTests.NpqsqlTests.SubmitsTraces(packageVersion: "6.0.11") [FAIL]
  16:00:16 [ERR] [xUnit.net 00:06:12.03]     IntegrationTests.NpqsqlTests.SubmitsTraces(packageVersion: "6.0.11") [FAIL]
  16:00:16 [DBG] [xUnit.net 00:06:12.03] IntegrationTests: --- FAIL: IntegrationTests.NpqsqlTests.SubmitsTraces(6.0.11) (0.00s)
  16:00:17 [DBG]   Failed IntegrationTests.NpqsqlTests.SubmitsTraces(packageVersion: "8.0.3") [1 ms]
  16:00:17 [DBG]   Error Message:
  16:00:17 [DBG]    Docker.DotNet.DockerApiException : Docker API responded with status code=InternalServerError, response={"message":"Head \"[https://registry-1.docker.io/v2/library/postgres/manifests/16.3\](https://registry-1.docker.io/v2/library/postgres/manifests/16.3/)": received unexpected HTTP status: 502 Bad Gateway"}
  16:00:17 [DBG] 
  16:00:17 [DBG]   Stack Trace:
  16:00:17 [DBG]      at Docker.DotNet.DockerClient.HandleIfErrorResponseAsync(HttpStatusCode statusCode, HttpResponseMessage response)
  16:00:17 [DBG]    at Docker.DotNet.DockerClient.MakeRequestForRawResponseAsync(HttpMethod method, String path, IQueryString queryString, IRequestContent body, IDictionary`2 headers, CancellationToken token)
  16:00:17 [DBG]    at Docker.DotNet.Models.StreamUtil.MonitorResponseForMessagesAsync[T](Task`1 responseTask, DockerClient client, CancellationToken cancel, IProgress`1 progress)
  16:00:17 [DBG]    at DotNet.Testcontainers.Clients.DockerImageOperations.CreateAsync(IImage image, IDockerRegistryAuthenticationConfiguration dockerRegistryAuthConfig, CancellationToken ct) in /_/src/Testcontainers/Clients/DockerImageOperations.cs:line 74
  16:00:17 [DBG]    at DotNet.Testcontainers.Clients.TestcontainersClient.PullImageAsync(IImage image, CancellationToken ct) in /_/src/Testcontainers/Clients/TestcontainersClient.cs:line 375
  16:00:17 [DBG]    at DotNet.Testcontainers.Clients.TestcontainersClient.RunAsync(IContainerConfiguration configuration, CancellationToken ct) in /_/src/Testcontainers/Clients/TestcontainersClient.cs:line 303
  16:00:17 [DBG]    at DotNet.Testcontainers.Containers.DockerContainer.UnsafeCreateAsync(CancellationToken ct) in /_/src/Testcontainers/Containers/DockerContainer.cs:line 413
  16:00:17 [DBG]    at DotNet.Testcontainers.Containers.DockerContainer.StartAsync(CancellationToken ct) in /_/src/Testcontainers/Containers/DockerContainer.cs:line 277
  16:00:17 [DBG]    at IntegrationTests.PostgresFixture.LaunchPostgresContainerAsync(Int32 port) in /home/runner/work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/test/IntegrationTests/PostgresCollection.cs:line 54
  16:00:17 [DBG]    at IntegrationTests.PostgresFixture.InitializeAsync() in /home/runner/work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/test/IntegrationTests/PostgresCollection.cs:line 33
  16:00:17 [DBG]   Failed IntegrationTests.NpqsqlTests.SubmitsTraces(packageVersion: "6.0.11") [1 ms]
  16:00:17 [DBG]   Error Message:
  16:00:17 [DBG]    Docker.DotNet.DockerApiException : Docker API responded with status code=InternalServerError, response={"message":"Head \"[https://registry-1.docker.io/v2/library/postgres/manifests/16.3\](https://registry-1.docker.io/v2/library/postgres/manifests/16.3/)": received unexpected HTTP status: 502 Bad Gateway"}
  16:00:17 [DBG] 
  16:00:17 [DBG]   Stack Trace:
  16:00:17 [DBG]      at Docker.DotNet.DockerClient.HandleIfErrorResponseAsync(HttpStatusCode statusCode, HttpResponseMessage response)
  16:00:17 [DBG]    at Docker.DotNet.DockerClient.MakeRequestForRawResponseAsync(HttpMethod method, String path, IQueryString queryString, IRequestContent body, IDictionary`2 headers, CancellationToken token)
  16:00:17 [DBG]    at Docker.DotNet.Models.StreamUtil.MonitorResponseForMessagesAsync[T](Task`1 responseTask, DockerClient client, CancellationToken cancel, IProgress`1 progress)
  16:00:17 [DBG]    at DotNet.Testcontainers.Clients.DockerImageOperations.CreateAsync(IImage image, IDockerRegistryAuthenticationConfiguration dockerRegistryAuthConfig, CancellationToken ct) in /_/src/Testcontainers/Clients/DockerImageOperations.cs:line 74
  16:00:17 [DBG]    at DotNet.Testcontainers.Clients.TestcontainersClient.PullImageAsync(IImage image, CancellationToken ct) in /_/src/Testcontainers/Clients/TestcontainersClient.cs:line 375
  16:00:17 [DBG]    at DotNet.Testcontainers.Clients.TestcontainersClient.RunAsync(IContainerConfiguration configuration, CancellationToken ct) in /_/src/Testcontainers/Clients/TestcontainersClient.cs:line 303
  16:00:17 [DBG]    at DotNet.Testcontainers.Containers.DockerContainer.UnsafeCreateAsync(CancellationToken ct) in /_/src/Testcontainers/Containers/DockerContainer.cs:line 413
  16:00:17 [DBG]    at DotNet.Testcontainers.Containers.DockerContainer.StartAsync(CancellationToken ct) in /_/src/Testcontainers/Containers/DockerContainer.cs:line 277
  16:00:17 [DBG]    at IntegrationTests.PostgresFixture.LaunchPostgresContainerAsync(Int32 port) in /home/runner/work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/test/IntegrationTests/PostgresCollection.cs:line 54
  16:00:17 [DBG]    at IntegrationTests.PostgresFixture.InitializeAsync() in /home/runner/work/opentelemetry-dotnet-instrumentation/opentelemetry-dotnet-instrumentation/test/IntegrationTests/PostgresCollection.cs:line 33