Skip to content

Fix builder resource flags being reset during builds - #2243

Open
nicoleman0 wants to merge 2 commits into
apple:mainfrom
nicoleman0:fix/builder-resource-flags-2153
Open

nicoleman0 wants to merge 2 commits into
apple:mainfrom
nicoleman0:fix/builder-resource-flags-2153

Conversation

@nicoleman0

Copy link
Copy Markdown

Type of Change

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

Motivation and Context

After container builder start --cpus N --memory M, a later container build starts the builder without resource flags. The omitted flags were resolved to the config.toml defaults, causing the existing builder to be recreated with those defaults.

Preserve the existing CPU or memory value when its flag is omitted. Explicit resource flags continue to replace the existing values. This also retains those resources when another setting, such as SSH forwarding, requires the builder to be recreated.

Fixes #2153.

Testing

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

Commands:

  • swift test --filter BuilderStartTests --skip-update
  • swift test --skip IntegrationTests --skip TestCLI --skip-update (773 tests)
  • swift format lint --strict --configuration .swift-format-nolint Sources/ContainerCommands/Builder/BuilderStart.swift Tests/ContainerCommandsTests/BuilderStartTests.swift

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.

[Bug]: container builder start --cpus/--memory do not size the build sandbox; builder status reports them anyway

1 participant