File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ def load_update_data():
6868
6969def should_update () -> bool :
7070 """Has it been longer than CHECK_EVERY since the last update check?"""
71+ # Allow disabling update checks with an environment variable
72+ if 'AGENTSTACK_UPDATE_DISABLE' in os .environ :
73+ return False
74+
7175 # Always check for updates in CI
7276 if _is_ci_environment ():
7377 return True
Original file line number Diff line number Diff line change 1+ import os
2+ import unittest
3+ from agentstack .update import should_update
4+
5+
6+ class UpdateTest (unittest .TestCase ):
7+ def test_updates_disabled_by_env_var_in_test (self ):
8+ assert 'AGENTSTACK_UPDATE_DISABLE' in os .environ
9+ assert not should_update ()
Original file line number Diff line number Diff line change @@ -15,4 +15,5 @@ commands =
1515 pytest -v {posargs}
1616 mypy: mypy agentops
1717setenv =
18- AGENTSTACK_TELEMETRY_OPT_OUT = 1
18+ AGENTSTACK_TELEMETRY_OPT_OUT = 1
19+ AGENTSTACK_UPDATE_DISABLE = 1
You can’t perform that action at this time.
0 commit comments