mittwald / mittwald/cli

mw app dependency update fails for ImageMagick: versionRange returns 404 despite versions existing

Open
#1,539 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
8
Forks
2
Avg merge
13h 26m
Merged PRs (30d)
35

Description

Description

The mw app dependency update command fails for ImageMagick (im) with a 404 error when using any version specification, even though versions exist in the API.

Steps to Reproduce

  1. List available ImageMagick versions (works):

    mw app dependency versions im
    # Shows: 7.1.1-41, 7.1.1-39, 7.0.7-26, etc.
    
  2. Try to update dependency with version range (fails):

    mw app dependency update APP_ID --set "im=~7"
    
  3. Try with exact version (also fails):

    mw app dependency update APP_ID --set "im=7.1.1-41"
    

Expected Behavior

The dependency should be updated to the specified version.

Actual Behavior

GET v2/system-softwares/.../versions
Response 404 Not Found
Message: no system software versions found

Root Cause Analysis

The API returns incorrect internalVersion values for ImageMagick. When querying the versions endpoint directly (without versionRange), the internalVersion field shows:

  • 71.1.41 instead of 7.1.1-41
  • 70.7.26 instead of 7.0.7-26

The major version appears to be concatenated with the minor version (71 instead of 7.1), causing the semver matcher to fail.

Comparison with working software (GraphicsMagick):
GraphicsMagick has correctly formatted internalVersion values like 1.3.38, and mw app dependency update --set "gm=~1" works as expected.

Environment

  • mw CLI version: 1.12.0
  • OS: macOS (Darwin 24.6.0)

Workaround

None - ImageMagick cannot be configured via CLI.

Note

This appears to be an API/database issue - the internalVersion values for ImageMagick are incorrectly formatted in the backend.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the mw app dependency versions im and mw app dependency update APP_ID --set "im=~7" commands, then trace the CLI's handling of the versions endpoint and its internalVersion values. Determine whether the correction belongs in the CLI or API, and verify that ImageMagick updates succeed for both range and exact-version specifications.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.