odo icon indicating copy to clipboard operation
odo copied to clipboard

Integration tests not running on Mac M1 locally

Open cdrage opened this issue 3 years ago • 3 comments

/kind bug

What versions of software are you using?

Operating System: Mac M1

Output of odo version: master

How did you run odo exactly?

Run:

KUBERNETES=true make test-integration-devfile

Actual behavior

    [odo] Interactive mode enabled, please answer the following questions:
    [odo]  •  Copying devfile from "/Users/cdrage/syncthing/dev/go/src/odo/tests/examples/source/devfiles/nodejs/devfile-outerloop.yaml"  ...
    [odo] I0706 14:13:25.394969   37502 context.go:141] absolute devfile path: '/private/var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085/devfile.yaml'
    [odo] I0706 14:13:25.394973   37502 context.go:92] absolute devfile path: '/private/var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085/devfile.yaml'
 ✓  Copying devfile from "/Users/cdrage/syncthing/dev/go/src/odo/tests/examples/source/devfiles/nodejs/devfile-outerloop.yaml"
    [odo] I0706 14:13:25.395112   37502 content.go:33] converted devfile YAML to JSON
    [odo] I0706 14:13:25.395143   37502 apiVersion.go:45] devfile schemaVersion: '2.2.0'
    [odo] I0706 14:13:25.395150   37502 helper.go:41] devfile apiVersion '2.2.0' is supported
    [odo] I0706 14:13:25.396480   37502 schema.go:46] validated devfile schema
    [odo]
    [odo] Your new component 'aname' is ready in the current directory.
    [odo] To start editing your component, use 'odo dev' and open this folder in your favorite IDE.
    [odo] Changes will be directly reflected on the cluster.
    [odo] I0706 14:13:25.397695   37502 writer.go:30] devfile yaml created at: 'devfile.yaml'
    [odo] I0706 14:13:25.397708   37502 odo.go:75] Could not get the latest release information in time. Never mind, exiting gracefully :)
    Running odo with args [odo build-images]
    [odo] I0706 14:13:25.427049   37503 util.go:754] Response will be cached in /var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/odohttpcache for 1h0m0s
    [odo] I0706 14:13:25.427120   37503 context.go:141] absolute devfile path: '/private/var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085/devfile.yaml'
    [odo] I0706 14:13:25.427125   37503 context.go:92] absolute devfile path: '/private/var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085/devfile.yaml'
    [odo] I0706 14:13:25.427204   37503 util.go:767] Cached response used.
    [odo] I0706 14:13:25.427273   37503 content.go:33] converted devfile YAML to JSON
    [odo] I0706 14:13:25.427304   37503 apiVersion.go:45] devfile schemaVersion: '2.2.0'
    [odo] I0706 14:13:25.427310   37503 helper.go:41] devfile apiVersion '2.2.0' is supported
    [odo] I0706 14:13:25.428576   37503 schema.go:46] validated devfile schema
    [odo] I0706 14:13:25.429818   37503 validate.go:45] Successfully validated devfile sections
    [odo] I0706 14:13:25.429823   37503 validate.go:45] Successfully validated devfile sections
    [odo]  ⚠  WARNING: Building images on Apple Silicon / M1 is not (yet) supported natively on Podman
    [odo]  ⚠  There is however a temporary workaround: https://github.com/containers/podman/discussions/12899
    [odo]
    [odo] ↪ Building & Pushing Container: quay.io/unknown-account/myimage
    [odo]  •  Building image locally  ...
    [odo] I0706 14:13:25.429886   37503 docker_compatible.go:50] Running command: [echo build -t quay.io/unknown-account/myimage -f /private/var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085/Dockerfile ${PROJECTS_ROOT}]
    [odo] build -t quay.io/unknown-account/myimage -f /private/var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085/Dockerfile /private/var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085
    [odo] I0706 14:13:25.432356   37503 odo.go:75] Could not get the latest release information in time. Never mind, exiting gracefully :)
 ✓  Building image locally [2ms]
    Deleting project: cmd-devfile-build-images-test34ksu
    Running kubectl with args [kubectl delete namespaces cmd-devfile-build-images-test34ksu --wait=false]
    [kubectl] namespace "cmd-devfile-build-images-test34ksu" deleted
    Setting current dir to: /Users/cdrage/syncthing/dev/go/src/odo/tests/integration/devfile
    Deleting dir: /var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085
    Deleting dir: /var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/452013594
  << End Captured GinkgoWriter Output

  Expected
      <string>:
      ↪ Building & Pushing Container: quay.io/unknown-account/myimage
       •  Building image locally  ...
      build -t quay.io/unknown-account/myimage -f /private/var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085/Dockerfile /private/var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085
 ✓  Building image locally [2ms]

  to contain substring
      <string>: build -t quay.io/unknown-account/myimage -f /var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085/Dockerfile /var/folders/cn/pm5mgrcs5h339nphypxtvd080000gn/T/3893156085
  In [It] at: /Users/cdrage/syncthing/dev/go/src/odo/tests/integration/devfile/cmd_devfile_build_images_test.go:36

Expected behavior

For some reason, it's using "/private" before the tmp files / context instead of the usually tmp directory of /var/folders/cn

It's picking up /private from somewhere in the code and that's not correct...

Any logs, error output, etc?

See above.

cdrage avatar Jul 06 '22 18:07 cdrage

@anandrkskd @kadel

cdrage avatar Jul 26 '22 12:07 cdrage

https://github.com/redhat-developer/odo/pull/4139 found the fix, but i don't like it as it may a constant battle to make sure that when we compare / use contexts we add a DARWIN check / mac check too..

cdrage avatar Jul 26 '22 12:07 cdrage

but i don't like it as it may a constant battle to make sure that when we compare / use contexts we add a DARWIN check / mac check too..

Maybe we can add it to the helper context creation function ? Not sure if this will work!

anandrkskd avatar Jul 26 '22 12:07 anandrkskd