Skip to content

discovery/file: Flaky TestInvalidFileUpdate and TestUpdateFileWithPartialWrites tests #18269

Description

@bwplotka
 FAIL: TestInvalidFileUpdate (1.10s)
    file_test.go:400: 
        	Error Trace:	/__w/prometheus/prometheus/discovery/file/file_test.go:227
        	            				/__w/prometheus/prometheus/discovery/file/file_test.go:400
        	Error:      	Not equal: 
        	            	expected: "[{\"targets\":[\"localhost:9090\",\"example.org:443\"],\"labels\":{\"__meta_filepath\":\"/tmp/TestInvalidFileUpdate505692747/001/valid.yml\",\"foo\":\"bar\"}},{\"targets\":[\"my.domain\"],\"labels\":{\"__meta_filepath\":\"/tmp/TestInvalidFileUpdate505692747/001/valid.yml\"}}]"
        	            	actual  : "[{\"targets\":[]},{\"targets\":[]}]"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-[{"targets":["localhost:9090","example.org:443"],"labels":{"__meta_filepath":"/tmp/TestInvalidFileUpdate505692747/001/valid.yml","foo":"bar"}},{"targets":["my.domain"],"labels":{"__meta_filepath":"/tmp/TestInvalidFileUpdate505692747/001/valid.yml"}}]
        	            	+[{"targets":[]},{"targets":[]}]
        	Test:       	TestInvalidFileUpdate
FAIL

https://github.com/prometheus/prometheus/actions/runs/22899997735/job/66443837347?pr=18250

--- FAIL: TestUpdateFileWithPartialWrites (1.10s)
    file_test.go:422: 
        	Error Trace:	/__w/prometheus/prometheus/discovery/file/file_test.go:227
        	            				/__w/prometheus/prometheus/discovery/file/file_test.go:422
        	Error:      	Not equal: 
        	            	expected: "[{\"targets\":[\"localhost:9090\",\"example.org:443\"],\"labels\":{\"__meta_filepath\":\"/tmp/TestUpdateFileWithPartialWrites2210457790/001/valid.yml\",\"foo\":\"bar\"}},{\"targets\":[\"my.domain\"],\"labels\":{\"__meta_filepath\":\"/tmp/TestUpdateFileWithPartialWrites2210457790/001/valid.yml\"}}]"
        	            	actual  : "[{\"targets\":[]},{\"targets\":[]}]"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-[{"targets":["localhost:9090","example.org:443"],"labels":{"__meta_filepath":"/tmp/TestUpdateFileWithPartialWrites2210457790/001/valid.yml","foo":"bar"}},{"targets":["my.domain"],"labels":{"__meta_filepath":"/tmp/TestUpdateFileWithPartialWrites2210457790/001/valid.yml"}}]
        	            	+[{"targets":[]},{"targets":[]}]
        	Test:       	TestUpdateFileWithPartialWrites

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions