runfinch / finch

The Finch CLI is an open source client for container development
https://www.runfinch.com
Apache License 2.0
3.48k stars 87 forks source link

Failed to install on macos-14 github actions runner #812

Closed aajtodd closed 4 months ago

aajtodd commented 4 months ago

Describe the bug Trying to integrate finch into our GH actions for macos builds as the container build/execution tool.

Steps to reproduce

Partial GitHub actions workflow:

jobs:
  build:
    runs-on: macos-14
    env:
      # docker not available on macos-* due to licensing
      OCI_EXE: finch
    steps:
      - name: Install finch OCI client
        shell: bash
        run: |
          brew update
          brew install --cask finch
          finch vm init

Expected behavior Finch installed correctly

Screenshots or logs

 ==> Downloading https://github.com/runfinch/finch/releases/download/v1.1.1/Finch-v1.1.1-aarch64.pkg
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/562778457/7b76009d-3cd6-415e-8f83-4a7c23e38476?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240213%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240213T210704Z&X-Amz-Expires=300&X-Amz-Signature=f4e3429f467841c272059ff9bed65d9066f38134b60606d50445e2ccbcbb03d9&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=562778457&response-content-disposition=attachment%3B%20filename%3DFinch-v1.1.1-aarch64.pkg&response-content-type=application%2Foctet-stream
Warning: macOS's Gatekeeper has been disabled for this Cask
==> Installing Cask finch
==> Running installer for finch with sudo; the password may be necessary.
installer: Package name is Finch
installer: Installing at base path /
installer: The install was successful.
🍺  finch was successfully installed!
time="2024-02-13T21:07:29Z" level=info msg="Using default values due to missing config file at \"/Users/runner/.finch/finch.yaml\""
time="2024-02-13T21:07:29Z" level=info msg="\"/Users/runner/.finch\" directory doesn't exist, attempting to create it"
time="2024-02-13T21:07:29Z" level=info msg="binaries directory doesn't exist"
time="2024-02-13T21:07:29Z" level=info msg="Requesting root access to finish network dependency configuration"
time="2024-02-13T21:07:29Z" level=info msg="sudoers file not found: open /etc/sudoers.d/finch-lima: no such file or directory"
time="2024-02-13T21:07:29Z" level=info msg="Initializing and starting Finch virtual machine..."
time="2024-02-13T21:07:38Z" level=error msg="Finch virtual machine failed to start, debug logs:\ntime=\"2024-02-13T21:07:29Z\" level=info msg=\"Terminal is not available, proceeding without opening an editor\"\ntime=\"2024-02-13T21:07:29Z\" level=warning msg=\"treating lima version \\\"4ea0a83\\\" from \\\"/Applications/Finch/lima/data/finch/lima-version\\\" as very latest release\"\ntime=\"2024-02-13T21:07:29Z\" level=warning msg=\"treating lima version \\\"4ea0a83\\\" from \\\"/Applications/Finch/lima/data/finch/lima-version\\\" as very latest release\"\ntime=\"2024-02-13T21:07:29Z\" level=info msg=\"Starting socket_vmnet daemon for \\\"finch-shared\\\" network\"\ntime=\"2024-02-13T21:07:29Z\" level=info msg=\"Starting the instance \\\"finch\\\" with VM driver \\\"qemu\\\"\"\ntime=\"2024-02-13T21:07:30Z\" level=info msg=\"QEMU binary \\\"/Applications/Finch/lima/bin/qemu-system-aarch64\\\" seems properly signed with the \\\"com.apple.security.hypervisor\\\" entitlement\"\ntime=\"2024-02-13T21:07:30Z\" level
time="2024-02-13T21:07:38Z" level=fatal msg="exit status 1"
Error: Process completed with exit code 1.

Additional context Failing CI job here: https://github.com/awslabs/aws-crt-kotlin/actions/runs/7892727529/job/21539850103

To help debug the issue as quickly as possible, we recommend generating a support bundle with finch support-bundle generate and attaching it to this issue. This packages all Finch-related configs and logs into one file.

aajtodd commented 4 months ago

Looks like colima hit this too.

Seems to be a limitation of the M1 chips used on macos-14 runners.

weikequ commented 4 months ago

So this would be due to Apple not supporting nested virtualization on Apple silicon (as the m-series chip runners run as VM instances themselves), so unfortunately, as finch uses a VM on macos, it wouldn't be possible for it to be run on these runners.