Skip to content

feat: support multiple macOS instance families in a single ASG#196

Open
cchristous wants to merge 1 commit intorenderedtext:masterfrom
cchristous:support-multiple-mac-families
Open

feat: support multiple macOS instance families in a single ASG#196
cchristous wants to merge 1 commit intorenderedtext:masterfrom
cchristous:support-multiple-mac-families

Conversation

@cchristous
Copy link
Contributor

Summary

  • Allows SEMAPHORE_AGENT_MAC_FAMILY to accept comma-separated values (e.g. mac2,mac2-m2,mac2-m2pro) so a single ASG can launch instances across different Mac Dedicated Host families
  • Auto-generates launch template overrides from the family list, mapping each family to its .metal instance type
  • The host resource group's allowed-host-families is updated to include all specified families

Why this is safe

  • For single-family configurations (the current default of mac2), behavior is unchanged — getAsList() on a single value returns a one-element array, producing the same result as before
  • The launch template overrides are only auto-generated for macOS stacks; non-macOS stacks continue to use SEMAPHORE_AGENT_ASG_LAUNCH_TEMPLATE_OVERRIDES_JSON as before
  • Combined with SEMAPHORE_AGENT_ON_DEMAND_ALLOCATION_STRATEGY=prioritized, the ASG will prefer the first family in the list and fall back to subsequent ones only when no hosts of the preferred family are available

Test plan

  • Existing macOS tests updated to include auto-host-recovery parameter (was missing after previous commit)
  • New test: multiple mac families produces correct allowed-host-families and launch template overrides
  • New test: prioritized allocation strategy with multiple families verifies correct override order and distribution config
  • All 55 tests pass

Allow SEMAPHORE_AGENT_MAC_FAMILY to accept comma-separated values
(e.g. "mac2,mac2-m2") so a single ASG can launch instances across
different Mac hardware generations. The host resource group is
configured with all specified families, and launch template overrides
are auto-generated from the family list. Combined with the
"prioritized" on-demand allocation strategy, the ASG will prefer
the first family in the list and fall back to subsequent ones.
@cchristous cchristous marked this pull request as ready for review March 12, 2026 02:56
@dexyk
Copy link
Contributor

dexyk commented Mar 13, 2026

/sem-approve

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.

2 participants