nanovms / ops

ops - build and run nanos unikernels
https://ops.city
MIT License
1.3k stars 132 forks source link

mac ci failing #1280

Closed eyberg closed 2 years ago

eyberg commented 2 years ago
--- FAIL: TestBuildImage (6.06s)
panic: rename /Users/distiller/.ops/packages/manifest.json.tmp /Users/distiller/.ops/packages/manifest.json: no such file or directory [recovered]
    panic: rename /Users/distiller/.ops/packages/manifest.json.tmp /Users/distiller/.ops/packages/manifest.json: no such file or directory

goroutine 38 [running]:
testing.tRunner.func1.2({0x145bda0, 0xc00006ec00})
    /usr/local/Cellar/go/1.17.6/libexec/src/testing/testing.go:1209 +0x24e
testing.tRunner.func1()
    /usr/local/Cellar/go/1.17.6/libexec/src/testing/testing.go:1212 +0x218
panic({0x145bda0, 0xc00006ec00})
    /usr/local/Cellar/go/1.17.6/libexec/src/runtime/panic.go:1038 +0x215
github.com/nanovms/ops/lepton.ExtractPackage({0xc00031d650, 0x23}, {0xc0003ec380, 0x1c}, 0x30)
    /Users/distiller/project/lepton/package.go:331 +0x774
github.com/nanovms/ops/lepton.addCommonFilesToManifest(0xc000379650)
    /Users/distiller/project/lepton/image.go:140 +0x1e5
github.com/nanovms/ops/lepton.BuildManifest(0xc0001115e8)
    /Users/distiller/project/lepton/image.go:347 +0x1ef
github.com/nanovms/ops/lepton.BuildImage({{0x0, 0x0, 0x0}, 0x0, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, ...})
    /Users/distiller/project/lepton/image.go:30 +0x25
github.com/nanovms/ops/oci.(*Provider).BuildImage(0x474, 0x1102f20)
    /Users/distiller/project/oci/oci_image.go:28 +0x66
github.com/nanovms/ops/oci_test.TestBuildImage(0x0)
    /Users/distiller/project/oci/oci_image_test.go:90 +0x179
testing.tRunner(0xc0003d0d00, 0x14f6dc8)
    /usr/local/Cellar/go/1.17.6/libexec/src/testing/testing.go:1259 +0x102
created by testing.(*T).Run
    /usr/local/Cellar/go/1.17.6/libexec/src/testing/testing.go:1306 +0x35a
FAIL    github.com/nanovms/ops/oci  6.411s
// DownloadFile downloads file using URL
func DownloadFile(filepath string, url string, timeout int, showProgress bool) error {
    log.Info("Downloading..", url, "to", filepath)
    out, err := os.Create(filepath + ".tmp")
    if err != nil {
        return err
    }

i'm not sure why this tmp file is being made but i'm willing to bet that converting it to https://pkg.go.dev/io/ioutil#TempFile fixes this

girishramnani commented 2 years ago

I can look into this

girishramnani commented 2 years ago

I can confirm that locally these have been fixed

go test -timeout 30s -run ^TestBuildImage$ github.com/nanovms/ops/oci

ok      github.com/nanovms/ops/oci  16.062s
girishramnani commented 2 years ago

Ok, I can confirm that the CI is still failing. So still important