getporter / porter

Porter enables you to package your application artifact, client tools, configuration and deployment logic together as an installer that you can distribute, and install with a single command.
https://porter.sh
Apache License 2.0
1.24k stars 211 forks source link

Unit test failure on arm64 machine #1856

Open vdice opened 2 years ago

vdice commented 2 years ago

I'm seeing the following unit test failure on my M1 Mac w/ arm64 architecture:

$ make test-unit
...
--- FAIL: TestFileSystem_InstallFromFeedUrl (0.00s)
    logger.go:17: Downloading http://127.0.0.1:54581/atom.xml to /var/folders/nc/yfj0pylx4vzdr3s_66r129s00000gn/T/porter219578225/atom.xml

    install_test.go:85:
            Error Trace:    install_test.go:85
            Error:          Received unexpected error:
                            helm @ v1.2.4 did not publish a download for darwin/arm64
                            get.porter.sh/porter/pkg/pkgmgmt/client.(*FileSystem).InstallFromFeedURL
                                /Users/vdice/go/src/get.porter.sh/porter/pkg/pkgmgmt/client/install.go:123
                            get.porter.sh/porter/pkg/pkgmgmt/client.(*FileSystem).Install
                                /Users/vdice/go/src/get.porter.sh/porter/pkg/pkgmgmt/client/install.go:23
                            get.porter.sh/porter/pkg/pkgmgmt/client.TestFileSystem_InstallFromFeedUrl
                                /Users/vdice/go/src/get.porter.sh/porter/pkg/pkgmgmt/client/install_test.go:84
                            testing.tRunner
                                /usr/local/go/src/testing/testing.go:1259
                            runtime.goexit
                                /usr/local/go/src/runtime/asm_arm64.s:1133
            Test:           TestFileSystem_InstallFromFeedUrl
FAIL
FAIL    get.porter.sh/porter/pkg/pkgmgmt/client 1.078s
carolynvs commented 2 years ago

Lol @vdice you humble bragging about your new M1? 😀 I need to get one of those!

The problem is that the unit tests rely on having the helm mixin, and helm3 doesn't support arm yet.

helm @ v1.2.4 did not publish a download for darwin/arm64
devigned commented 2 years ago

Looks like helm3 is releasing arm64 artifacts https://github.com/helm/helm/releases. Should this test skip in the presence of darwin/arm64 until support is added?

carolynvs commented 2 years ago

Oh sorry I should have been more clear that the helm3 mixin isn't compiling to arm. The current matrix for the porter client, mixin and plugins is windows/darwin/linux on amd64 only, and the runtime only supports linux/amd64.

Agreed that judicious skipping so that someone on arm can run the unit tests would be very helpful.