GitHub
10/04/2025, 7:03 PMMELTANO_CLI_DISABLE_VERSION_CHECK) and project setting (cli.disable_version_check)
• Platform-aware upgrade commands: Detects and suggests appropriate upgrade command for pip, uv, or pipx installations
• Error resilient: Network failures don't block CLI execution
• Development version aware: Skips check for development versions (e.g., 0.0.0, 3.8.0.dev0)
## Implementation Details
• New VersionCheckService class handles version checking logic
• Integrated into CLI command execution via InstrumentedCmd and PartialInstrumentedCmd
• Uses PyPI JSON API to fetch latest version information
• Cached results stored in .meltano/run/version_check_cache.json
• Comprehensive test suite with 13+ test cases
## Example Output
A new version of Meltano is available (v3.9.0)\!
You are currently running v3.8.0.
To upgrade:
uv pip install --upgrade meltano
For more information, visit: <https://docs.meltano.com/guide/installation>
## Configuration
Users can disable version checking via:
# Environment variable
export MELTANO_CLI_DISABLE_VERSION_CHECK=1
# Or project setting
meltano config meltano set cli.disable_version_check true
## Test plan
• Version check service correctly fetches latest version from PyPI
• Caching mechanism works and respects 24-hour expiration
• Proper upgrade command detection for pip/uv/pipx installations
• Environment variable and project setting disable mechanisms work
• Development versions are properly skipped
• Network errors don't block CLI execution
• Integration with CLI command execution
🤖 Generated with Claude Code
## Summary by Sourcery
Add a non-intrusive version check warning system to the Meltano CLI to notify users when they are running an outdated version and suggest appropriate upgrade commands.
New Features:
• Display informational warnings on outdated CLI versions with upgrade instructions
• Cache version check results for 24 hours to minimize PyPI API calls
• Allow disabling version checks via MELTANO_CLI_DISABLE_VERSION_CHECK environment variable or cli.disable_version_check project setting
• Automatically detect and suggest pip, uv, or pipx upgrade commands based on installation method
• Skip version checks for development builds and excluded commands (version, upgrade, init)
• Handle network or other errors gracefully without blocking CLI execution
Enhancements:
• Integrate VersionCheckService into InstrumentedCmd and PartialInstrumentedCmd to run checks before command execution
• Add cli.disable_version_check setting to the default project settings
Tests:
• Add comprehensive tests for VersionCheckService covering caching, fetch logic, disable options, development version detection, upgrade command resolution, and formatting
• Add CLI integration tests to verify version check behavior, exclusion of certain commands, disable mechanisms, and error resilience
meltano/meltanoGitHub
10/04/2025, 7:03 PM