Skip to content

Conversation

@maybeec
Copy link
Member

@maybeec maybeec commented Jan 8, 2026

Description

Fixes issue #1602: Being offline can block IDE startup when a tool update is available but not cached.

Changes

Core Fix

  • AbstractToolRepository.java: Enhanced doDownload() to check if download is already cached before throwing CliOfflineException in offline mode
  • LocalToolCommandlet.java:
    • Modified performToolInstallation() to return VersionIdentifier indicating which version was actually installed
    • Added proper offline fallback logic that returns existing installed version when download fails
    • Fixed installation path calculation to use actual installed version instead of requested version

Supporting Changes

  • Python.java: Updated override to match new performToolInstallation() signature
  • PackageManagerBasedLocalToolCommandlet.java: Updated override to match new signature

Tests

Added comprehensive test coverage in InstallCommandletTest.java:

  • testInstallCommandletOfflineWithCachedDownload: Fresh install with cached download succeeds
  • testInstallCommandletOfflineWithoutCachedDownload: Fresh install without cache fails appropriately
  • testInstallCommandletOfflineUpdateWithoutCachedDownload: Update scenario keeps old version when new version not cached

Documentation

Testing

All offline scenario tests pass successfully:

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

Checklist

  • Code compiles successfully
  • New tests added and passing
  • Coding conventions followed (AssertJ for assertions, proper error handling)
  • CHANGELOG.adoc updated
  • Design reviewed and refactored to avoid duplication
  • Commit message follows format: #1602: Being offline can block ide startup

Related Issue

Closes #1602

@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Jan 8, 2026
@maybeec maybeec added update related to updating software or the entire ide bugfix PR that fixes a bug issue labels Jan 8, 2026
@maybeec maybeec moved this from 🆕 New to Team Review in IDEasy board Jan 8, 2026
@coveralls
Copy link
Collaborator

coveralls commented Jan 8, 2026

Pull Request Test Coverage Report for Build 20815662835

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 61 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.04%) to 69.937%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/tool/python/Python.java 3 73.53%
com/devonfw/tools/ide/tool/repository/AbstractToolRepository.java 28 67.24%
com/devonfw/tools/ide/tool/LocalToolCommandlet.java 30 80.65%
Totals Coverage Status
Change from base Build 20815639483: 0.04%
Covered Lines: 10202
Relevant Lines: 14011

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR that fixes a bug issue update related to updating software or the entire ide

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Being offline can block ide startup

2 participants