open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.01k stars 2.32k forks source link

[processor/logstransform] Flaky test - TestLogsTransformProcessor/simpleTest #9761

Open dmitryax opened 2 years ago

dmitryax commented 2 years ago
=== RUN   TestLogsTransformProcessor/simpleTest
    processor_test.go:140: 
            Error Trace:    processor_test.go:140
            Error:          Not equal: 
                            expected: internal.Logs{orig:(*v1.ExportLogsServiceRequest)(0xc00000e420)}
                            actual  : internal.Logs{orig:(*v1.ExportLogsServiceRequest)(0xc00000e468)}

                            Diff:
                            --- Expected
                            +++ Actual
                            @@ -16,6 +16,6 @@
                                    (*v1.LogRecord)({
                            -        TimeUnixNano: (uint64) 1640995200000000000,
                            +        TimeUnixNano: (uint64) 0,
                                     ObservedTimeUnixNano: (uint64) 1641081600000000000,
                            -        SeverityNumber: (v1.SeverityNumber) 9,
                            -        SeverityText: (string) (len=4) "Info",
                            +        SeverityNumber: (v1.SeverityNumber) 0,
                            +        SeverityText: (string) "",
                                     Body: (v1.AnyValue) {
                            @@ -25,22 +25,3 @@
                                     },
                            -        Attributes: ([]v1.KeyValue) (len=3) {
                            -         (v1.KeyValue) {
                            -          Key: (string) (len=3) "msg",
                            -          Value: (v1.AnyValue) {
                            -           <max depth reached>
                            -          }
                            -         },
                            -         (v1.KeyValue) {
                            -          Key: (string) (len=3) "sev",
                            -          Value: (v1.AnyValue) {
                            -           <max depth reached>
                            -          }
                            -         },
                            -         (v1.KeyValue) {
                            -          Key: (string) (len=4) "time",
                            -          Value: (v1.AnyValue) {
                            -           <max depth reached>
                            -          }
                            -         }
                            -        },
                            +        Attributes: ([]v1.KeyValue) <nil>,
                                     DroppedAttributesCount: (uint32) 0,
            Test:           TestLogsTransformProcessor/simpleTest
--- FAIL: TestLogsTransformProcessor (0.12s)
    --- FAIL: TestLogsTransformProcessor/simpleTest (0.12s)
FAIL
FAIL    github.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor  0.168s
FAIL
make[2]: *** [../../Makefile.Common:46: test] Error 1

Seen in https://github.com/open-telemetry/opentelemetry-collector-contrib/runs/6313031997?check_suite_focus=true

dmitryax commented 2 years ago

Looks like introduced after https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/9335

@dehaansa can you please take a look?

dmitryax commented 2 years ago

Another failure in main branch https://github.com/open-telemetry/opentelemetry-collector-contrib/runs/6315386021?check_suite_focus=true

dmitryax commented 2 years ago

one more https://github.com/open-telemetry/opentelemetry-collector-contrib/runs/6315241814?check_suite_focus=true

djaglowski commented 2 years ago

Reopening this, as it was observed again here: https://github.com/open-telemetry/opentelemetry-collector-contrib/runs/6938319015?check_suite_focus=true#step:7:1137

djaglowski commented 2 years ago

Again here: https://github.com/open-telemetry/opentelemetry-collector-contrib/runs/7631967283?check_suite_focus=true

BinaryFissionGames commented 2 years ago

Seeing this failure again here: https://github.com/open-telemetry/opentelemetry-collector-contrib/runs/7731126143?check_suite_focus=true#step:7:1220

djaglowski commented 2 years ago

Again here: https://github.com/open-telemetry/opentelemetry-collector-contrib/runs/7787595836?check_suite_focus=true#step:7:1292

github-actions[bot] commented 1 year ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

djaglowski commented 1 year ago

Resolved by #17079

dmitryax commented 1 year ago

I still can see this https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/3859255846/jobs/6578608245

dmitryax commented 1 year ago

One more https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/3859949209/jobs/6579930336

atoulme commented 1 year ago

And 2 hours later: https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/3860356252/jobs/6580621728

atoulme commented 1 year ago

Trying to fix this with #21530 and following up on https://github.com/open-telemetry/opentelemetry-collector/issues/7634 so we avoid using time.Sleep at all in our tests.

bogdandrutu commented 1 year ago

Definitely we should avoid time.Sleep, but we cannot also block infinitely. Why the Eventuallyf is not working?