From c1e002c67266cb89461b2503a5f4ab693310dde4 Mon Sep 17 00:00:00 2001 From: John Logan Date: Mon, 20 Jul 2026 12:37:46 -0700 Subject: [PATCH 1/2] Fix machine ID length test. - PR #1956 limited the container ID length to 63, the maximum DNS label length. - The machine ID test was still using the maximum Linux hostname length of 64 as a starting point. --- Tests/IntegrationTests/Machine/TestCLIMachineCommand.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tests/IntegrationTests/Machine/TestCLIMachineCommand.swift b/Tests/IntegrationTests/Machine/TestCLIMachineCommand.swift index 657124d53..7df3b75f5 100644 --- a/Tests/IntegrationTests/Machine/TestCLIMachineCommand.swift +++ b/Tests/IntegrationTests/Machine/TestCLIMachineCommand.swift @@ -43,7 +43,11 @@ struct TestCLIMachineCommand { @Test func testCreateNameLongestValid() async { await withKnownIssue("XPC timeout on machine-apiserver.bootMachine", isIntermittent: true) { try await ContainerFixture.with { f in - let maxNameLength = LinuxContainer.maxIDLength - MachineConfiguration.containerUUIDLength - 1 + // Start with container ID or DNS label length, whichever is shorter. + // Reduce by length of UUID suffix. + // Reduce by 1 for dash separator between ID and suffix. + let maxHostnameLength = min(LinuxContainer.maxIDLength, 63) + let maxNameLength = maxHostnameLength - MachineConfiguration.containerUUIDLength - 2 let name = String(repeating: "a", count: maxNameLength) f.addCleanup { f.cleanupMachine(name) } try f.doMachineCreate(name: name, image: machineImage) From d5a386861ff7456fc5f3353b43ae81513c4ccc43 Mon Sep 17 00:00:00 2001 From: John Logan Date: Mon, 20 Jul 2026 14:26:41 -0700 Subject: [PATCH 2/2] Capture integration test JSON event streams for flake debug. --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5a9cd2cbb..0a1d601b3 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,15 @@ ifneq ($(strip $(LOG_ROOT)),) SYSTEM_START_OPTS += --log-root "$(strip $(LOG_ROOT))" endif +# swift test event-stream JSON output for the concurrent/global integration +# passes, only when LOG_ROOT is set. +CONCURRENT_EVENT_STREAM_OPTS := +GLOBAL_EVENT_STREAM_OPTS := +ifneq ($(strip $(LOG_ROOT)),) + CONCURRENT_EVENT_STREAM_OPTS += --event-stream-output-path "$(strip $(LOG_ROOT))/integration-concurrent.json" --event-stream-version 6.3 + GLOBAL_EVENT_STREAM_OPTS += --event-stream-output-path "$(strip $(LOG_ROOT))/integration-global.json" --event-stream-version 6.3 +endif + MACOS_VERSION := $(shell sw_vers -productVersion) MACOS_MAJOR := $(shell echo $(MACOS_VERSION) | cut -d. -f1) @@ -285,9 +294,9 @@ define RUN_INTEGRATION echo "==> Warmup pass" && \ $(SWIFT) test $(INTEGRATION_SWIFT_EXTRA) -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --filter "$(WARMUP_FILTER)" && \ echo "==> Concurrent pass (width=$(PARALLEL_WIDTH))" && \ - $(SWIFT) test $(INTEGRATION_SWIFT_EXTRA) -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --experimental-maximum-parallelization-width $(PARALLEL_WIDTH) --filter "$(CONCURRENT_FILTER)" && \ + $(SWIFT) test $(INTEGRATION_SWIFT_EXTRA) -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) $(CONCURRENT_EVENT_STREAM_OPTS) --experimental-maximum-parallelization-width $(PARALLEL_WIDTH) --filter "$(CONCURRENT_FILTER)" && \ echo "==> Global pass (serial)" && \ - $(SWIFT) test $(INTEGRATION_SWIFT_EXTRA) -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --experimental-maximum-parallelization-width 1 --filter "$(SERIAL_FILTER)" ; \ + $(SWIFT) test $(INTEGRATION_SWIFT_EXTRA) -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) $(GLOBAL_EVENT_STREAM_OPTS) --experimental-maximum-parallelization-width 1 --filter "$(SERIAL_FILTER)" ; \ exit_code=$$? ; \ $(INTEGRATION_POST_TEST) \ echo Ensuring apiserver stopped after the CLI integration tests ; \