Closed eapolinario closed 4 months ago
Commenting out these lines resolves the issue for the compile_tests which fail intermittently
This code is used for redirecting the stdout and stderr which helps in verifying in messages printed when executing the commands which are shown to the users https://github.com/flyteorg/flyte/blob/master/flytectl/cmd/testutils/test_utils.go#L102-L113
Unclear yet whats causing this for these particular tests
Tried running for 100 iteration
for ((i = 1; i <= 20; i++)); do 10s
go test github.com/flyteorg/flyte/flytectl/cmd/compile -race -coverprofile=coverage.txt -covermode=atomic
done
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.648s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.645s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.646s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.666s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.664s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.669s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.665s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.667s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.685s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.666s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.667s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.665s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.668s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.667s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.670s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.664s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.669s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.668s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.662s coverage: 89.5% of statements
ok github.com/flyteorg/flyte/flytectl/cmd/compile 1.668s coverage: 89.5% of statements
Without commenting
for ((i = 1; i <= 20; i++)); do
go test github.com/flyteorg/flyte/flytectl/cmd/compile -race -coverprofile=coverage.txt -covermode=atomic
done
time="2024-05-02T16:13:31-07:00" level=info msg="Initialized Mock Clientset"
FAIL github.com/flyteorg/flyte/flytectl/cmd/compile 0.639s
FAIL
time="2024-05-02T16:13:33-07:00" level=info msg="Initialized Mock Clientset"
FAIL github.com/flyteorg/flyte/flytectl/cmd/compile 0.653s
FAIL
time="2024-05-02T16:13:35-07:00" level=info msg="Initialized Mock Clientset"
FAIL github.com/flyteorg/flyte/flytectl/cmd/compile 0.661s
Nice find! Thanks for taking a look. Let me confirm we don't really need those lines there.
Describe the bug
flytectl unit tests are failing pretty consistently in CI.
Tests run locally and only fail occasionally.
Here's the full output:
Expected behavior
flytectl unit tests pass and can be set as required.
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?