You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found the fix, unsure about the implications @vito
When running this script, we can basically get the flake right away, in less than 10 iterations:
#!/bin/bash
log_file="test_results.log"
max_iterations=10
echo"Starting test loop. Results will be logged to $log_file"| tee -a "$log_file"foriin$(seq 1 $max_iterations);doecho"Iteration $i of $max_iterations"| tee -a "$log_file"echo"----------------------------------------"| tee -a "$log_file"
go test -race -count=1 ./core/integration -run "TestModule/TestSSHAuthSockPathHandling" -v
exit_code=${PIPESTATUS[0]}echo"Exit code: $exit_code"| tee -a "$log_file"echo"----------------------------------------"| tee -a "$log_file"if [ $exit_code-ne 0 ];thenecho"Test failed with exit code $exit_code. Stopping the loop."| tee -a "$log_file"exit$exit_codefiecho""| tee -a "$log_file"doneecho"All iterations completed successfully."| tee -a "$log_file"
After a few iterations / isolations on my side, it seems that the root cause is the fact that the tests do run in parallel from the SAME client. Moving the client inside each of the test running in parallel does remove the flake:
func (ModuleSuite) TestSSHAuthSockPathHandling(ctx context.Context, t*testctx.T) {
repoURL:="[email protected]:dagger-modules/private/test/more/dagger-test-modules-private.git"t.Run("SSH auth with home expansion and symlink", func(ctx context.Context, t*testctx.T) {
c:=connect(ctx, t)
mountedSocket, cleanup:=mountedPrivateRepoSocket(c, t)
defercleanup()
})
t.Run("SSH auth from different relative paths", func(ctx context.Context, t*testctx.T) {
c:=connect(ctx, t)
mountedSocket, cleanup:=mountedPrivateRepoSocket(c, t)
defercleanup()
})
A bit confused on the implications of that statement
Ok, this behavior is a bit surprising and a bit confusing: in a nested environment, to have full isolation across parallel tests, it is better to have a client per test ?
Activity
grouville commentedon Sep 25, 2024
Probably a flake, I've been tracking another one last week 🙏 Hope it's not blocking the PR. Taking a look 👀
grouville commentedon Sep 25, 2024
Potentially related to #8385. But the fact that all commits since cb42521 got merged fail is suspicious 👀
grouville commentedon Sep 25, 2024
Confirming flake, keeping a look at it
grouville commentedon Sep 25, 2024
Found the fix, unsure about the implications @vito
When running this script, we can basically get the flake right away, in less than 10 iterations:
After a few iterations / isolations on my side, it seems that the root cause is the fact that the tests do run in parallel from the SAME client. Moving the client inside each of the test running in parallel does remove the flake:
A bit confused on the implications of that statementOk, this behavior is a bit surprising and a bit confusing: in a nested environment, to have full isolation across parallel tests, it is better to have a client per test ?