Repository navigation
feat(cli): hint when a newer CLI version is available - #102
Merged
Merged
Conversation
Checks PyPI at most once a day (cached in ~/.haystack-enterprise/version_check.json) and prints an upgrade hint on stderr after the command. Skipped in CI, off a TTY, or with HAYSTACK_ENTERPRISE_NO_UPDATE_CHECK set; failures are silent. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
volkanarisli
approved these changes
Oct 23, 2026
# Conflicts: # AGENTS.md # tests/unit/test_cli.py
# Conflicts: # haystack_enterprise_sdk/cli.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Users had no way to learn that a newer CLI release exists. After each command,
haystack-enterprisenow prints a one-line upgrade hint on stderr when PyPI has a newerhaystack-enterprise-sdk.Example
Installed with
uv tool install(as in the README andinstall.sh):Installed with
pipinto a venv:How it behaves
~/.haystack-enterprise/version_check.json.CI=true), when stderr is not a TTY, after Ctrl-C, or withHAYSTACK_ENTERPRISE_NO_UPDATE_CHECK=1.uv tool upgradewhen running from auv/tools/<name>environment,pip install -Uotherwise.No new dependencies; implementation is in
haystack_enterprise_sdk/cli.py, documented inAGENTS.md.Testing
TestUpdateHintunit tests (respx-mocked PyPI): newer version prints the hint and is cached, same/older/pre-release prints nothing, network error is silent, CI and opt-out skip the network, upgrade command matches the install type.make tests-unit,make types,make all-fixpass.🤖 Generated with Claude Code
https://claude.ai/code/session_019h2bsqDDfsKkLiTnaQHkuR