Skip to content

Fix image load from file descriptor input#1832

Open
d3v07 wants to merge 1 commit into
apple:mainfrom
d3v07:fix/image-load-dev-fd-input
Open

Fix image load from file descriptor input#1832
d3v07 wants to merge 1 commit into
apple:mainfrom
d3v07:fix/image-load-dev-fd-input

Conversation

@d3v07

@d3v07 d3v07 commented Jun 25, 2026

Copy link
Copy Markdown

Summary

  • Stage descriptor-backed image load inputs before calling the image service.
  • Keep regular --input paths direct to avoid unnecessary copying.
  • Add focused coverage for regular files, non-regular files, /dev/fd/<n>, and archive copy behavior.

Root cause

container image load --input /dev/fd/N accepts a path that is only meaningful in the CLI process. The image service process cannot reopen that caller-owned descriptor, so the load fails before it can consume the archive.

Fixes #1429.

Validation

  • swift build --target ContainerCommands
  • swift format lint --recursive Sources/ContainerCommands/Image/ImageLoad.swift Tests/ContainerCommandsTests/ImageLoadTests.swift
  • git diff --check

I also ran swift test --filter ImageLoadTests, but this local environment fails before the filtered test target runs because the active developer directory is Command Line Tools and the test build cannot import Testing/XCTest. BUILDING.md documents Xcode 26 as the required active developer directory.

@d3v07 d3v07 force-pushed the fix/image-load-dev-fd-input branch from 854db14 to ce8d26b Compare June 25, 2026 17:49
@d3v07 d3v07 marked this pull request as ready for review June 25, 2026 17:55
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.

[Request]: container image load fails to read from file descriptor

1 participant