Skip to content

fix: Increase XPC timeout for Machine API operations#2006

Open
dev-kvt wants to merge 1 commit into
apple:mainfrom
dev-kvt:fix/xpc-timeout
Open

fix: Increase XPC timeout for Machine API operations#2006
dev-kvt wants to merge 1 commit into
apple:mainfrom
dev-kvt:fix/xpc-timeout

Conversation

@dev-kvt

@dev-kvt dev-kvt commented Jul 23, 2026

Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

In constrained CI environments, heavy operations such as creating/unpacking images (createMachine) and booting virtual machines (bootMachine) can take longer than the default 10-second XPC timeout. This causes intermittent test failures (e.g. XPC timeout for request to com.apple.container.core.machine-apiserver/createMachine).

This PR increases the XPC request timeouts in MachineClient.swift for create and boot operations to 120 seconds, and stop/delete operations to 60 seconds. It also cleans up TestCLIMachineCommand.swift by removing the withKnownIssue workaround wrapper on testCreateNameLongestValid, as the increased timeout resolves the underlying issue.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

Comment thread Sources/Services/MachineAPIService/Client/MachineClient.swift Outdated
@jglogan

jglogan commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@dev-kvt Your commits are signed but unverified. When you update your PR, make sure you've got your signing key set up so GH can verify the commits.

@dev-kvt

dev-kvt commented Jul 24, 2026

Copy link
Copy Markdown
Author

@jglogan I have updated MachineClient.swift to remove the timeouts (timeout: nil) for list, create, boot, stop, and inspect, since their underlying handlers delegate to the container-apiserver (allowing those long-running tasks like pulling and unpacking to finish without hitting XPC timeouts).

For the local-only operations that do not call the container-apiserver, I kept sensible timeouts (the .seconds(60) timeout for deleting the local bundle directory in delete, and the default 10s timeout for simple get/set operations).

Also, thank you for pointing out the unverified commits issue! I realized I had not uploaded my local SSH key specifically as a "Signing Key" on GitHub. I have corrected that in my GitHub settings and amended the commit, so the changes in this PR should now be fully verified.

Please let me know if you would like me to adjust anything else!

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.

2 participants