argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15.12k stars 3.21k forks source link

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

Closed MasonM closed 2 months ago

MasonM commented 2 months ago

Fixes #12744 (hopefully)

Motivation

This addresses the comments from https://github.com/argoproj/argo-workflows/pull/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

agilgur5 commented 2 months ago

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 https://github.com/argoproj/argo-workflows/pull/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)