Skip to content

fix(ci): preserve hosted macOS DNS during fleet setup - #4838

Merged
ScriptedAlchemy merged 3 commits into
masterfrom
codex/preserve-macos-runner-dns
Nov 9, 2026
Merged

ScriptedAlchemy merged 3 commits into
masterfrom
codex/preserve-macos-runner-dns

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

The hosted Mac enrolled in the Bazel fleet, then immediately lost DNS for both the GitHub cache and releases.bazel.build. Bazel never started. The log shows Tailscale's action replaced Ethernet DNS with 100.100.100.100 even though this repository passed --accept-dns=false. Its pinned implementation explicitly calls networksetup for both DNS servers and search domains when the tailnet enables MagicDNS. The fleet coordinator is already resolved through Tailscale's local API and uses its IP address. Failed macOS setup · Pinned upstream implementation

The shared composite action reads both Ethernet settings before enrollment and restores them afterwards, including when enrollment fails. DHCP-provided configuration restores using the native Empty argument. Explicit lists retain their original order. The restore step runs before cache access and Bazel.

I read an actual macOS network service with automatic DNS and search domains using the production reader. Local tests checked the arguments passed to networksetup for automatic configuration, multiple IPv4/IPv6 resolvers and multiple search domains. No local network settings were modified. The composite YAML and actionlint passed. Hosted macOS verification is required to verify the real resolver and fleet together.

Hosted native macOS agent-hosts and Linux verification.

The hosted native macOS job passed. On the dependent #4836 head the runner log shows the Tailscale DNS override, restoration of Ethernet settings, a fresh download of Bazel 9.3.2 from releases.bazel.build, and 574 passing agent-hosts tests with one opt-in evaluation ignored.

Draft shared CI prerequisite. This PR is stacked on the Linux download fix so a dependent PR can use both verified runner setup changes.

@changeset-bot

changeset-bot Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1395c7d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy
ScriptedAlchemy changed the base branch from codex/linux-launcher-distribution to master November 9, 2026 08:58
@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review November 9, 2026 08:58
@ScriptedAlchemy
ScriptedAlchemy merged commit 53928aa into master Nov 9, 2026
7 of 11 checks passed

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Devin Review

Comment on lines +28 to +33
def restore_settings(service, settings):
for option in SETTINGS:
subprocess.run(
["networksetup", "-set" + option, service, *(settings[option] or ["Empty"])],
check=True,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Resolver restoration lacks regression coverage

Changes to restore_settings can break automatic or explicit DNS restoration without failing a checked-in test. The new reader and writer have no committed tests.

Learn more

This shared CI action reads macOS resolver settings before Tailscale enrollment and restores them afterward. Both behaviors are new, but no committed test exercises the parser or the networksetup commands. The repository requires test coverage for new behavior. Local manual verification does not catch later changes to the action.

Example: Given automatic DNS and two explicit search domains, a mock networksetup can return the automatic DNS sentence and two domain lines. A test can check that restoration passes Empty for DNS and both original domains in order.

Recommended fix: Add checked-in tests for read_settings and restore_settings using mocked subprocess results. Cover automatic values, ordered explicit lists, and failed networksetup commands; run them through a maintained test target.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant