Skip to content

#1311: improve IDE_MIN_VERSION support#2121

Merged
hohwille merged 12 commits into
devonfw:mainfrom
hohwille:vivu001-feature/1311-improve-ide-min-version-support
Jul 6, 2026
Merged

#1311: improve IDE_MIN_VERSION support#2121
hohwille merged 12 commits into
devonfw:mainfrom
hohwille:vivu001-feature/1311-improve-ide-min-version-support

Conversation

@hohwille

@hohwille hohwille commented Jul 6, 2026

Copy link
Copy Markdown
Member

This PR fixes #1311

Replacement of PR #2084

Implemented changes:

  • Added this.context.verifyIdeMinVersion(true) invocation to AbstractUpdateCommandlet.doRun
  • Fixed AbstractIdeContext so verifyIdeMinVersion(false) gets called before (non-processable) commandlet (except for UpgradeCommandlet).
  • Removed duplicate version verification calls from CreateCommandlet.doRun()
  • Updated unit test

Testing instructions

Setup:

  • Create a fork of ide-settings
  • create a branch ide-min-version
  • Edit ide.properties to have IDE_MIN_VERSION=2027.01.001
  • run build-local-dev.sh
  • ide create test-min-version https://github.com/«your-login»/ide-settings#ide-min-version

Expected behaviour:
The settings repository is cloned into <project-name>/settings. After reloading the context, a version check is triggered and fails with an error message:

Your version of IDEasy is currently 2025.07.001-...
However, this is too old as your project requires at latest version 2027.01.001 
Please run the following command to update to the latest version of IDEasy and fix the problem:
ide upgrade 

Project initialization is incomplete. No "Successfully created new project" message appears.


Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@hohwille hohwille added this to the release:2026.07.001 milestone Jul 6, 2026
@hohwille hohwille self-assigned this Jul 6, 2026
@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Jul 6, 2026
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 28828978861

Coverage increased (+0.3%) to 72.099%

Details

  • Coverage increased (+0.3%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 118 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

118 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/context/AbstractIdeContext.java 101 67.8%
com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java 17 82.2%

Coverage Stats

Coverage Status
Relevant Lines: 16558
Covered Lines: 12436
Line Coverage: 75.11%
Relevant Branches: 7434
Covered Branches: 4862
Branch Coverage: 65.4%
Branches in Coverage %: Yes
Coverage Strength: 3.18 hits per line

💛 - Coveralls

@hohwille
hohwille merged commit 2cf3f50 into devonfw:main Jul 6, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from 🆕 New to ✅ Done in IDEasy board Jul 6, 2026
@hohwille

hohwille commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

Retest successful:
All non-processable commandlets now give me the expected warning.
Additionally ide update and ide create give me fast fail error.
Example:

$ ide update
Your version of IDEasy is currently 2026.07.001-07_07_06-SNAPSHOT
However, this is too old as your project requires at latest version 2027.01.001
Please run the following command to update to the latest version of IDEasy and fix the problem:
ide upgrade
Start: update (pull) settings repository
Successfully ended step 'update (pull) settings repository'.
Start: Copy configuration templates
Successfully ended step 'Copy configuration templates'.
Logfile can be found at D:\projects\_ide\logs\2026\07\07\test-ide-update-09-39-46.log
Step 'ide (update)' failed: com.devonfw.tools.ide.cli.CliException: Your version of IDEasy is currently 2026.07.001-07_07_06-SNAPSHOT
However, this is too old as your project requires at latest version 2027.01.001
Please run the following command to update to the latest version of IDEasy and fix the problem:
ide upgrade
1 step(s) failed out of 3 steps.
Your version of IDEasy is currently 2026.07.001-07_07_06-SNAPSHOT
However, this is too old as your project requires at latest version 2027.01.001
Please run the following command to update to the latest version of IDEasy and fix the problem:
ide upgrade

@hohwille hohwille added enhancement New feature or request update related to updating software or the entire ide install installation process of IDE + tools and install commandlet logging IDEasy specific logging (levels, messages, etc.) upgrade upgrade of IDEasy to latest version QA approved Label a PR that has been re-testet via nightly SNAPSHOT after merge and commented. labels Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request install installation process of IDE + tools and install commandlet logging IDEasy specific logging (levels, messages, etc.) QA approved Label a PR that has been re-testet via nightly SNAPSHOT after merge and commented. update related to updating software or the entire ide upgrade upgrade of IDEasy to latest version

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

improve IDE_MIN_VERSION support

4 participants