Some fixes to develop on Mac - #161
Merged
Merged
Conversation
indradhanush
previously approved these changes
Aug 11, 2026
indradhanush
left a comment
Collaborator
There was a problem hiding this comment.
Approved to unblock.
For e.g. running unit tests on mac
…upport The e2e suite built the host-agent binary for the runner's native GOOS, which breaks when running on macOS since the binary is copied into a Linux BYOH host container. Force GOOS=linux for that build. The installer registry only recognized x86-64 bundles, and the bundle ingredient downloader hardcoded the amd64 containerd tarball, so an arm64 BYOH host container hit "No k8s support for OS" and could never install. Add arm64 registry entries and parameterize the containerd download by $ARCH.
…ontainer The agent integration tests copy the host-agent binary into real Linux BYOH host containers and expect them to reach envtest's local API server over the containers' "host" networking. On macOS, both the built binary and that networking assumption break: container runtimes there run everything inside a Linux VM, so "host" networking only shares the VM's namespace, not the real Mac. Rather than bridge across that boundary, run the whole suite inside a Linux container sharing the VM's own podman socket (see hack/docker/linux-test-runner.Dockerfile), which makes host networking and loopback behave exactly as they do in CI. agent/host_agent_suite_test.go now builds two binaries: a native one for help_flag_test.go's direct local exec, and a linux/<host arch> one for the containers, matching the fix already applied to the e2e suite. agent/registration/csr_test.go's "should return error if not able to write kubeconfig" test relied on mkdir failing with EACCES at the filesystem root, which only holds for a non-root process. Root (needed elsewhere in this suite, e.g. cleaning up /etc/cni/net.d) bypasses that check. Switched to blocking the target path with a regular file, which fails with ENOTDIR regardless of privilege level.
sebastian-pf9
force-pushed
the
private/sebastian/fix-e2e-on-mac
branch
from
August 11, 2026 15:02
ed60a5f to
6d84ab6
Compare
… via a Linux container Encode the container-run invocation validated this session as make targets (agent-test-linux-vm, test-e2e-linux-vm) instead of leaving it as an ad hoc shell command, and document why it's needed and the one-time host setup it depends on in docs/local_dev.md.
…t-test, controller-test, webhook-test
sebastian-pf9
force-pushed
the
private/sebastian/fix-e2e-on-mac
branch
from
August 11, 2026 15:06
6d84ab6 to
ca69c5b
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Collaborator
Author
|
e2e tests failed. Claude says:
|
indradhanush
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Missing: