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

ci: follow-ups + fix flaky Windows http artifact tests. Fixes #12744 #13670

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

MasonM
Copy link
Contributor

@MasonM MasonM commented Sep 27, 2024

Fixes #12744 (hopefully)

Motivation

This addresses the comments from #13660. Also, it hopefully fixes the flaky CI / Windows Unit Tests (pull_request) test suite, but this is kind of a shot in the dark.

Modifications

The errors from CI / Windows Unit Tests (pull_request) indicate it's trying to write temp files to /tmp:

    --- FAIL: TestArtifactoryArtifactDriver_Load/Found (0.00s)
        http_test.go:75:
            	Error Trace:	D:/a/argo-workflows/argo-workflows/workflow/artifacts/http/http_test.go:75
            	Error:      	Received unexpected error:
            	            	open /tmp/found: The system cannot find the path specified.
            	Test:       	TestArtifactoryArtifactDriver_Load/Found

which obviously isn't the right directory under Windows, but the test does pass sometimes, and it seems like writing to the wrong directory would cause consistent failures. Regardless, the tests should be using os.MkdirTemp() for this anyway.

Verification

Will check action output

This addresses the comments from
argoproj#13660. Also, it
hopefully fixes the flaky `CI / Windows Unit Tests (pull_request)` test
suite. The errors indicate it's trying to write temp files to `/tmp`:
```
    --- FAIL: TestArtifactoryArtifactDriver_Load/Found (0.00s)
        http_test.go:75:
            	Error Trace:	D:/a/argo-workflows/argo-workflows/workflow/artifacts/http/http_test.go:75
            	Error:      	Received unexpected error:
            	            	open /tmp/found: The system cannot find the path specified.
            	Test:       	TestArtifactoryArtifactDriver_Load/Found
```

which obviously isn't the right directory under Windows, but the test
does pass sometimes, and it seems like writing to the wrong directory
would cause consistent failures. Regardless, the tests should be using
`os.CreateTemp()` for this anyway.

Signed-off-by: Mason Malone <[email protected]>
Copy link
Member

@Joibel Joibel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and seems to have passed at least one run of the windows tests

@Joibel Joibel merged commit 7f14810 into argoproj:main Sep 27, 2024
27 checks passed
@agilgur5 agilgur5 changed the title ci: follow-up changes and fix flaky Windows tests. Fixes #12744 ci: follow-ups + fix flaky Windows tests. Fixes #12744 Sep 27, 2024
@agilgur5 agilgur5 added the area/build Build or GithubAction/CI issues label Sep 27, 2024
@agilgur5 agilgur5 changed the title ci: follow-ups + fix flaky Windows tests. Fixes #12744 ci: follow-ups + fix flaky Windows http tests. Fixes #12744 Sep 27, 2024
@agilgur5 agilgur5 added the area/windows Windows Container support label Sep 27, 2024
@agilgur5 agilgur5 changed the title ci: follow-ups + fix flaky Windows http tests. Fixes #12744 ci: follow-ups + fix flaky Windows http artifact tests. Fixes #12744 Sep 27, 2024
@agilgur5
Copy link
Member

agilgur5 commented Sep 27, 2024

Thanks for the follow-ups and attempt to fix the WIndows flake!

Fixes #12744 (hopefully)

The errors from CI / Windows Unit Tests (pull_request) indicate it's trying to write temp files to /tmp:

For posterity, Mason asked about this on Slack and noted that #12071 in this file used os.PathSeparator, but does not necessarily explain a test flake, as a path issue should fail consistently (at least, in theory, filesystems can be unreliable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Build or GithubAction/CI issues area/windows Windows Container support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestHTTPArtifactDriver_Load intermittently fails on the windows CI suite
3 participants