Skip datadog integratio on macos if colima fails to start, since colima appears to be flaky due to a code signing error

This commit is contained in:
David Dworken 2023-09-08 19:27:16 -07:00
parent 084af932ea
commit 27d5c59263
No known key found for this signature in database
2 changed files with 9 additions and 2 deletions

View File

@ -43,7 +43,9 @@ jobs:
# Set a consistent hostname so we can run tests that depend on it
sudo scutil --set HostName ghaction-runner-hostname
- name: MacOS Docker Setup
if: ${{ !startsWith(github.event.head_commit.message, 'Release') && matrix.os == 'macos-latest'}}
continue-on-error: true
# Install docker so it can be used for datadog
brew install docker
colima start

View File

@ -58,7 +58,12 @@ func TestMain(m *testing.M) {
if _, has_dd_api_key := os.LookupEnv("DD_API_KEY"); testutils.IsGithubAction() && has_dd_api_key {
ddStats, err := statsd.New("localhost:8125")
if err != nil {
panic(fmt.Errorf("Failed to start DataDog statsd: %w\n", err))
err := fmt.Errorf("Failed to start DataDog statsd: %w\n", err)
if runtime.GOOS == "darwin" {
fmt.Printf("%v", err)
} else {
panic(err)
}
}
GLOBAL_STATSD = ddStats
}