Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cirrus: Various fixes for macOS Cirrus CI #961

Merged
merged 1 commit into from
Mar 20, 2024
Merged

Conversation

DeeDeeG
Copy link
Member

@DeeDeeG DeeDeeG commented Mar 19, 2024

Context / Issues / Timeline

Our Cirrus CI has been on the fritz for the past month-ish.

  • Last passing/green Cirrus Cron build was here:
  • Cirrus cron builds have been been failing/red since the next one, starting here:
  • And the next one was failed/red for an additional, different reason, an expired Rolling upload (GitHub.com REST API) token. (My fault, apologies.)
  • And starting several days later, there is a failed/red build due to some Python environment configuration change, see PEP 668, apparently
    • Fri, 23 Feb 2024 15:00 https://cirrus-ci.com/task/6669707223236608
    • Should be fixed by the current PR installing python-setuptools with Homebrew, not pip.
    • Notice this is still on a macOS Monterey base image "Auto-upgraded from ghcr.io/cirruslabs/macos-monterey-xcode:14 to ghcr.io/cirruslabs/macos-monterey-xcode:latest"
  • Several days later, another failed/red build for an additional, new reason: Base images for macOS Monterey are being "auto-upgraded" to the latest OS version available, macOS Sonoma. I suppose the older Monterey Cirrus base images are hard-deprecated, given that two newer major OS versions of macOS are out and supported on Cirrus now?
    • Wed, 6 Mar 2024 15:00 https://cirrus-ci.com/task/5226704512221184
    • Should be addressed by the current PR pinning to macOS Ventura (13.x) instead of macOS Sonoma (14.x).
    • Note the new upgrade message: "Auto-upgraded from ghcr.io/cirruslabs/macos-monterey-xcode:14 to ghcr.io/cirruslabs/macos-sonoma-xcode:latest"

Changes / Fixes

  • Pin the base (CI-provided) OS image to Ventura, not Sonoma
    • Fixes some C/C++ compilation errors??
    • Gives us older XCode & compiler toolchain, I guess?
  • Get node using tj/n utility, not Homebrew
    • Homebrew "node" package is conflicting with (now deprecated) "node@16" package, loading dynamic libraries like icu4c keeps breaking...
  • Get Yarn using npm global install, not from Homebrew
    • I... honestly don't even know at this point. But Yarn from Homebrew is breaking somehow, possibly due to it referring back to Homebrew "node" package, but that's just a guess. It's cursed, I guess.
  • Get python-setuptools from Homebrew, not from pip
    • Why? Why is this necessary? Homebrew, explain? Something about our "environment being externally managed", so global package installs with pip aren't allowed. This makes sense to someone. See PEP 668.
  • Adjust PATH exports now that there's no "node@16" from Homebrew

Verification

These changes (plus tweaks to the only_if: directive so the changes would actually run) passed here!: https://cirrus-ci.com/build/4775018807164928

Old commits from my experiments are still hosted here if anyone is curious what I tried in order to get here... DeeDeeG/pulsar@master...cirrus-macOS-fixes-old

- Pin the base (CI-provided) OS image to Ventura, not Sonoma
  - Fixes some C/C++ compilation errors??
  - Gives us older XCode & compiler toolchain, I guess?
- Get node using tj/n utility, not Homebrew
  - Homebrew "node" package is conflicting with (now deprecated)
    "node@16" package, loading dynamic libraries like icu4c
    keeps breaking...
- Get Yarn using npm global install, not from Homebrew
  - I... honestly don't even know at this point. But Yarn from Homebrew
    is breaking somehow, possibly due to it referring back to Homebrew
    "node" package, but _that's just a guess_. It's cursed, I guess.
- Get python-setuptools from Homebrew, not from pip
  - Why? Why is this necessary? Homebrew, explain? Something about our
    "environment being externally managed", so global package installs
    with pip aren't allowed. This makes sense to someone. See PEP 668.
- Adjust PATH exports now that there's no "node@16" from Homebrew
Copy link
Contributor

@savetheclocktower savetheclocktower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me and contains no obvious errors. Soft approve!

Copy link
Member

@confused-Techie confused-Techie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the patience needed to get this all fixed is very impressive, it is somewhat absolutely ridiculous this much could break in a month in a CI environment.

But anyways super impressed, lets get this all merged, fantastic work!

@DeeDeeG
Copy link
Member Author

DeeDeeG commented Mar 20, 2024

it is somewhat absolutely ridiculous this much could break in a month in a CI environment.

It sure is! Wasn't expecting that!

@DeeDeeG
Copy link
Member Author

DeeDeeG commented Mar 20, 2024

Thank you both for the reviews, I'm spending a moment for some last minute re-reading of my PR body to make sure I've documented this anomalous amount of needed fixes, then intending to merge soon. Thanks!

@DeeDeeG
Copy link
Member Author

DeeDeeG commented Mar 20, 2024

PR body seems fine to me.

And the last find-and-replace package tests finally finished and passed, not that those have anything to do with Cirrus since they're running on GitHub Actions, but it's not a bad thing and I'll take it.

Merging!

@DeeDeeG DeeDeeG merged commit 4940e20 into master Mar 20, 2024
103 checks passed
@DeeDeeG DeeDeeG deleted the cirrus-macOS-fixes branch April 19, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants