Select macOS 26 CI runners. (#1074)

- Runner fleet is on 26.3 now.
- Integration tests started flaking and it appears that we've been misconfiguring/not configuring proxy variables where we needed to be and it finally caught up with us. Workflow now adds appropriate exclusions for host-to-container and container-to-container network requests so they aren't all rammed through the proxy.
This commit is contained in:
J Logan
2026-01-21 18:25:39 -08:00
committed by GitHub
parent 2b18fc5870
commit a18df81eb0
4 changed files with 28 additions and 7 deletions
+5 -1
View File
@@ -16,7 +16,7 @@ jobs:
name: Build and test the project
if: github.repository == 'apple/container'
timeout-minutes: 60
runs-on: [self-hosted, macos, sequoia, ARM64]
runs-on: [self-hosted, macos, tahoe, ARM64]
permissions:
contents: read
packages: read
@@ -73,6 +73,10 @@ jobs:
APP_ROOT=$(mktemp -d -p "${RUNNER_TEMP}")
trap 'rm -rf "${APP_ROOT}"; echo Removing data directory ${APP_ROOT}' EXIT
echo "Created data directory ${APP_ROOT}"
export NO_PROXY="${NO_PROXY},192.168.0.0/16,fe80::/10"
echo NO_PROXY=${NO_PROXY}
export no_proxy="${no_proxy},192.168.0.0/16,fe80::/10"
echo no_proxy=${no_proxy}
make APP_ROOT="${APP_ROOT}" test install-kernel integration
env:
DEVELOPER_DIR: "/Applications/Xcode-latest.app/Contents/Developer"
@@ -65,7 +65,7 @@ class TestCLINetwork: CLITest {
let url = "http://\(cidrAddress.address):\(port)"
var request = HTTPClientRequest(url: url)
request.method = .GET
let client = getClient()
let client = getClient(useHttpProxy: false)
defer { _ = client.shutdown() }
var retriesRemaining = Self.retries
var success = false
+2 -4
View File
@@ -196,8 +196,7 @@ class TestCLINoParallelCases: CLITest {
}
@available(macOS 26, *)
@Test(.disabled("https://github.com/apple/container/issues/953"))
func testNetworkPruneSkipsNetworksInUse() throws {
@Test func testNetworkPruneSkipsNetworksInUse() throws {
let name = getTestName()
let containerName = "\(name)_c1"
let networkInUse = "\(name)_inuse"
@@ -251,8 +250,7 @@ class TestCLINoParallelCases: CLITest {
}
@available(macOS 26, *)
@Test(.disabled("https://github.com/apple/container/issues/953"))
func testNetworkPruneSkipsNetworkAttachedToStoppedContainer() async throws {
@Test func testNetworkPruneSkipsNetworkAttachedToStoppedContainer() async throws {
let name = getTestName()
let containerName = "\(name)_c1"
let networkName = "\(name)"
+20 -1
View File
@@ -215,6 +215,8 @@ class CLITest {
runArgs.append(contentsOf: args)
}
runArgs.append(contentsOf: getProxyEnvironment())
if let image {
runArgs.append(image)
} else {
@@ -237,6 +239,7 @@ class CLITest {
var execArgs = [
"exec"
]
execArgs.append(contentsOf: getProxyEnvironment())
if detach {
execArgs.append("-d")
}
@@ -273,6 +276,8 @@ class CLITest {
var arguments = ["create", "--rm", "--name", name]
arguments.append(contentsOf: getProxyEnvironment())
// Add volume mounts
for volume in volumes {
arguments += ["-v", volume]
@@ -457,9 +462,12 @@ class CLITest {
}
}
func getClient() -> HTTPClient {
func getClient(useHttpProxy: Bool) -> HTTPClient {
var httpConfiguration = HTTPClient.Configuration()
let proxyConfig: HTTPClient.Configuration.Proxy? = {
guard useHttpProxy else {
return nil
}
let proxyEnv = ProcessInfo.processInfo.environment["HTTP_PROXY"]
guard let proxyEnv else {
return nil
@@ -555,4 +563,15 @@ class CLITest {
func doNetworkDeleteIfExists(name: String) {
let (_, _, _, _) = (try? run(arguments: ["network", "rm", name])) ?? (nil, "", "", 1)
}
private func getProxyEnvironment() -> [String] {
let proxyVars = Set([
"HTTP_PROXY", "http_proxy",
"HTTPS_PROXY", "https_proxy",
"NO_PROXY", "no_proxy",
])
return ProcessInfo.processInfo.environment
.filter { (key, val) in proxyVars.contains(key) }
.flatMap { (key, val) in ["-e", "\(key)=\(val)"] }
}
}