crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.27k stars 242 forks source link

Avoid using syscall.Sysctl to get macOS version #4091

Closed praveenkumar closed 7 months ago

praveenkumar commented 7 months ago

Looks like syscall.Sysctl is not reliable when it comes to get macOS version on different arch (Intel vs silicon) because of [0]. This PR uses sw_vers cmd result which seems to be consistent on both platform.

[0] https://github.com/golang/go/issues/58722

fixes: #4086

gbraad commented 7 months ago

This should be verified with @reestr

praveenkumar commented 7 months ago

/hold

praveenkumar commented 7 months ago

/unhold

openshift-ci[bot] commented 7 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfergeau, gbraad

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/crc-org/crc/blob/main/OWNERS)~~ [cfergeau,gbraad] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 7 months ago

@praveenkumar: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/integration-crc fa7c18ba0bf4d7bde34edafec983add381ab75c8 link true /test integration-crc
ci/prow/e2e-crc fa7c18ba0bf4d7bde34edafec983add381ab75c8 link true /test e2e-crc

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).