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

[pkg/stanza/fileconsumer] More tests failing intermittently on Windows #32299

Closed
crobert-1 opened this issue Apr 10, 2024 · 1 comment · Fixed by #32305
Closed

[pkg/stanza/fileconsumer] More tests failing intermittently on Windows #32299

crobert-1 opened this issue Apr 10, 2024 · 1 comment · Fixed by #32305
Labels
flaky test a test is flaky needs triage New item requiring triage os:windows pkg/stanza

Comments

@crobert-1
Copy link
Member

Component(s)

pkg/stanza

Describe the issue you're reporting

Failed run

From the output we see a lot of these tests are already being skipped on Windows, so the solution here may be to skip these as well if the flakiness can't be resolved quickly.

Output:

Running target 'test' in module 'pkg/translator/prometheusremotewrite' as part of group 'pkg'
C:/mingw64/bin/make --no-print-directory -C pkg/translator/prometheusremotewrite test
✖  fileconsumer/matcher (216ms)
D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/.tools/gotestsum --rerun-fails=1 --packages="./..." -- -race -timeout 300s -parallel 4 --tags=""
✖  fileconsumer/matcher (184ms)

=== Skipped
=== SKIP: fileconsumer TestStartAtEndNewFile (0.00s)
    file_test.go:328: Rotation tests have been flaky on Windows. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16331

=== SKIP: fileconsumer TestCopyTruncate (0.00s)
    rotation_test.go:27: Rotation tests have been flaky on Windows. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16331

=== SKIP: fileconsumer TestMoveCreate (0.00s)
    rotation_test.go:89: Rotation tests have been flaky on Windows. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16331

=== SKIP: fileconsumer TestMoveFile (0.00s)
    rotation_test.go:142: Moving files while open is unsupported on Windows

=== SKIP: fileconsumer TestTrackMovedAwayFiles (0.00s)
    rotation_test.go:170: Moving files while open is unsupported on Windows

=== SKIP: fileconsumer TestTrackRotatedFilesLogOrder (0.00s)
    rotation_test.go:210: Moving files while open is unsupported on Windows

=== SKIP: fileconsumer TestRotatedOutOfPatternMoveCreate (0.00s)
    rotation_test.go:249: Moving files while open is unsupported on Windows

=== SKIP: fileconsumer TestTruncateThenWrite (0.00s)
    rotation_test.go:327: Rotation tests have been flaky on Windows. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16331

=== SKIP: fileconsumer TestCopyTruncateWriteBoth (0.00s)
    rotation_test.go:359: Rotation tests have been flaky on Windows. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16331

=== SKIP: fileconsumer TestFileMovedWhileOff_BigFiles (0.00s)
    rotation_test.go:397: Rotation tests have been flaky on Windows. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16331

=== SKIP: fileconsumer/internal/reader TestValidateMoved (0.00s)
    validate_test.go:21: Moving files while open is unsupported on Windows

=== SKIP: fileconsumer/matcher/internal/finder TestFindFilesWithIOErrors (0.00s)
    finder_test.go:198: permissions test not valid on windows

=== SKIP: operator/input/file TestAddFileResolvedFields (0.00s)
    input_test.go:23: Windows symlinks usage disabled for now. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21088

=== Failed
=== FAIL: fileconsumer/matcher TestMatcher/Recursive_match_-_include (0.01s)
    matcher_test.go:780: 
        	Error Trace:	D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher/matcher_test.go:780
        	Error:      	Not equal: 
        	            	expected: []string{"a/1.log", "a/b/1.log", "a/b/c/1.log"}
        	            	actual  : []string{"a\\1.log", "a\\b\\1.log", "a\\b\\c\\1.log"}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,5 +1,5 @@
        	            	 ([]string) (len=3) {
        	            	- (string) (len=7) "a/1.log",
        	            	- (string) (len=9) "a/b/1.log",
        	            	- (string) (len=11) "a/b/c/1.log"
        	            	+ (string) (len=7) "a\\1.log",
        	            	+ (string) (len=9) "a\\b\\1.log",
        	            	+ (string) (len=11) "a\\b\\c\\1.log"
        	            	 }
        	Test:       	TestMatcher/Recursive_match_-_include

=== FAIL: fileconsumer/matcher TestMatcher/Recursive_match_-_include_and_exclude (0.01s)
    matcher_test.go:780: 
        	Error Trace:	D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher/matcher_test.go:780
        	Error:      	Not equal: 
        	            	expected: []string{"a/1.log"}
        	            	actual  : []string{"a\\1.log", "a\\b\\1.log", "a\\b\\c\\1.log"}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,3 +1,5 @@
        	            	-([]string) (len=1) {
        	            	- (string) (len=7) "a/1.log"
        	            	+([]string) (len=3) {
        	            	+ (string) (len=7) "a\\1.log",
        	            	+ (string) (len=9) "a\\b\\1.log",
        	            	+ (string) (len=11) "a\\b\\c\\1.log"
        	            	 }
        	Test:       	TestMatcher/Recursive_match_-_include_and_exclude

=== FAIL: fileconsumer/matcher TestMatcher (0.71s)

=== FAIL: fileconsumer/matcher TestMatcher/Recursive_match_-_include (re-run 1) (0.01s)
    matcher_test.go:780: 
        	Error Trace:	D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher/matcher_test.go:780
        	Error:      	Not equal: 
        	            	expected: []string{"a/1.log", "a/b/1.log", "a/b/c/1.log"}
        	            	actual  : []string{"a\\1.log", "a\\b\\1.log", "a\\b\\c\\1.log"}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,5 +1,5 @@
        	            	 ([]string) (len=3) {
        	            	- (string) (len=7) "a/1.log",
        	            	- (string) (len=9) "a/b/1.log",
        	            	- (string) (len=11) "a/b/c/1.log"
        	            	+ (string) (len=7) "a\\1.log",
        	            	+ (string) (len=9) "a\\b\\1.log",
        	            	+ (string) (len=11) "a\\b\\c\\1.log"
        	            	 }
        	Test:       	TestMatcher/Recursive_match_-_include

=== FAIL: fileconsumer/matcher TestMatcher (re-run 1) (0.01s)

=== FAIL: fileconsumer/matcher TestMatcher/Recursive_match_-_include_and_exclude (re-run 1) (0.01s)
    matcher_test.go:780: 
        	Error Trace:	D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher/matcher_test.go:780
        	Error:      	Not equal: 
        	            	expected: []string{"a/1.log"}
        	            	actual  : []string{"a\\1.log", "a\\b\\1.log", "a\\b\\c\\1.log"}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,3 +1,5 @@
        	            	-([]string) (len=1) {
        	            	- (string) (len=7) "a/1.log"
        	            	+([]string) (len=3) {
        	            	+ (string) (len=7) "a\\1.log",
        	            	+ (string) (len=9) "a\\b\\1.log",
        	            	+ (string) (len=11) "a\\b\\c\\1.log"
        	            	 }
        	Test:       	TestMatcher/Recursive_match_-_include_and_exclude

=== FAIL: fileconsumer/matcher TestMatcher (re-run 1) (0.01s)

DONE 2 runs, 3267 tests, 13 skipped, 7 failures in 117.900s
make[2]: *** [../../Makefile.Common:126: test] Error 1
make[1]: *** [Makefile:165: pkg/stanza] Error 2
make[1]: *** Waiting for unfinished jobs....
✓  . (1.355s)

DONE 119 tests in 5.[761](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/8634182419/job/23669002714#step:7:762)s
make[1]: Leaving directory 'D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib'
make: *** [Makefile:113: gotest] Error 2
Error: Process completed with exit code 1.
@crobert-1 crobert-1 added needs triage New item requiring triage flaky test a test is flaky labels Apr 10, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky test a test is flaky needs triage New item requiring triage os:windows pkg/stanza
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant