Skip to content

FIx macOS removing Python from last Monterey version

Adrien Kohlbecker requested to merge ak/fix-timeout into main

What does this MR do?

Updates our code to not install the Xcode CLT. We have to install them manually before calling ansible, because ansible relies on python. You can't execute python on macOS 12.3+ without installing the Xcode CLT, and the latter requires GUI interaction.

Also fixes dotnet tests on the next build

Why was this MR needed?

The main branch is currently failing with a cryptic error: https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/macstadium/orka/-/jobs/2382567234

fatal: [runners-macos-ci-2382567234]: FAILED! => changed=false 
  elapsed: 121
  msg: 'timed out waiting for ping module test: ''ping'''

Removing this code and waiting for ssh ourselves reveal:

fatal: [ak]: FAILED! => changed=false 
  ansible_facts: {}
  failed_modules:
    ansible.legacy.setup:
      ansible_facts:
        discovered_interpreter_python: /usr/bin/python3
      failed: true
      module_stderr: |-
        xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
      module_stdout: ''
      msg: |-
        MODULE FAILURE
        See stdout/stderr for the exact error
      rc: 1
      warnings:
      - Platform darwin on host ak is using the discovered Python interpreter at /usr/bin/python3, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information.
  msg: |-
    The following modules failed to execute: ansible.legacy.setup

What's the best way to test this MR?

What are the relevant issue numbers?

Edited by Adrien Kohlbecker

Merge request reports