Skip to content

feat(app): allow pinning system-software versions on app create#1954

Merged
gandie merged 6 commits into
masterfrom
fix/app-create-system-software-version
Jul 1, 2026
Merged

feat(app): allow pinning system-software versions on app create#1954
gandie merged 6 commits into
masterfrom
fix/app-create-system-software-version

Conversation

@martin-helmich

Copy link
Copy Markdown
Member

Summary

Closes #1951.

mw app create php|node|python previously offered no way to choose the runtime / system-software version — the newest available version was always assigned, so version-sensitive apps (e.g. Shopware 6.6 on PHP 8.5) would fail to start and required a second mw app dependency update call.

This adds a --set <dependency>=<version> flag to the custom-runtime create commands (php, php-worker, node, python) that pins the system-software version right after the installation is created, mirroring the existing mw app dependency update --set syntax.

mw app create php --document-root /public --set php=~8.3
mw app create node --set node=~18

Changes

  • Extracted the dependency-resolution logic from app dependency update into a shared updateAppDependencies helper (src/lib/resources/app/dependencies.tsx), now used by both the create flow and the update command.
  • Added the multi-valued set flag to the shared app flag set and wired it into the four custom-runtime create commands via AppInstaller.
  • AppInstaller.exec applies the pinned versions (update policy patchLevel) after creating the installation and before waiting for it to normalize.
  • Filtered non-scalar flags out of the userInputs payload in triggerAppInstallation so the array-valued set flag isn't serialized as a user input.
  • Added usage examples to the php, node, and python create commands.

Note: the README/docs could not be regenerated in this environment (oclif readme fails with an unrelated LRUCache is not a constructor error); docs should be regenerated before merge.

🤖 Generated with Claude Code

@martin-helmich martin-helmich force-pushed the fix/app-create-system-software-version branch from 5f2bc90 to 3531ee6 Compare June 30, 2026 11:29
@martin-helmich martin-helmich marked this pull request as draft July 1, 2026 06:41
@martin-helmich

Copy link
Copy Markdown
Member Author

Converted back to draft status; there's an API change in the works that would allow us to set the system software versions with a single API call while installing the app.

martin-helmich and others added 6 commits July 1, 2026 13:01
Add a `--set <dependency>=<version>` flag to the custom runtime create
commands (`app create php|php-worker|node|python`) that pins the
system-software (runtime) version at creation time, mirroring
`app dependency update`. Previously the newest available runtime was
always assigned, requiring a second `app dependency update` call.

The dependency-resolution logic is extracted into a shared
`updateAppDependencies` helper used by both the create flow and the
`app dependency update` command.

Closes #1951

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the no-op `new Range(...)` truthiness check with semver's
`validRange`, so an invalid version constraint surfaces the intended
friendly error instead of a raw semver TypeError.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump @mittwald/api-client to ^4.400.0, whose requestAppinstallation
endpoint accepts a systemSoftware map directly. Resolve the requested
system-software versions before creating the installation and pass them
into the create request, so pinning no longer needs a follow-up
patchAppinstallation call.

The resolution logic is extracted into resolveSystemSoftwareUpdates,
shared by the create flow and the app dependency update command.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@martin-helmich martin-helmich force-pushed the fix/app-create-system-software-version branch from f5d71c8 to 7f26e44 Compare July 1, 2026 11:01
@martin-helmich martin-helmich marked this pull request as ready for review July 1, 2026 11:03
@martin-helmich martin-helmich requested a review from gandie July 1, 2026 11:07
Comment thread src/lib/resources/app/dependencies.tsx
@martin-helmich martin-helmich force-pushed the fix/app-create-system-software-version branch 2 times, most recently from 81de312 to 7f26e44 Compare July 1, 2026 13:38
@gandie gandie merged commit 5bd527b into master Jul 1, 2026
23 checks passed
@gandie gandie deleted the fix/app-create-system-software-version branch July 1, 2026 13:44
mittwald-machine added a commit that referenced this pull request Jul 1, 2026
# [1.19.0](v1.18.0...v1.19.0) (2026-07-01)

### Bug Fixes

* **project:** handle inaccessible customer in project get ([#1956](#1956)) ([203a95b](203a95b))

### Features

* **app:** allow pinning system-software versions on app create ([#1954](#1954)) ([5bd527b](5bd527b))
* **experimental/deploy:** make image and service name configurable ([#1962](#1962)) ([47ba831](47ba831)), closes [#1960](#1960)
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.

mw app create php|node|python: allow pinning the system-software (runtime) version at creation

2 participants