mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
fix: simplify telemetry test mode detection
The integration-tests.sh script already sets LLAMA_STACK_TEST_STACK_CONFIG_TYPE based on the stack config. Our custom detection logic was unnecessary and potentially interfering. Revert to relying on the environment variable set by the test script. The LLAMA_STACK_DISABLE_GUNICORN environment variable is still set correctly when stack_mode == 'server', which happens for both server: and docker: configs.
This commit is contained in:
parent
c8f82cad6a
commit
a8bc99408c
1 changed files with 3 additions and 11 deletions
|
|
@ -17,17 +17,9 @@ from tests.integration.telemetry.collectors import InMemoryTelemetryManager, Otl
|
|||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def telemetry_test_collector(request):
|
||||
# Determine stack mode from --stack-config argument
|
||||
stack_config = request.session.config.getoption("--stack-config", default=None)
|
||||
if not stack_config:
|
||||
stack_config = os.environ.get("LLAMA_STACK_CONFIG", "")
|
||||
|
||||
# Check if running in server or docker mode (both need server-side telemetry)
|
||||
if stack_config.startswith("server:") or stack_config.startswith("docker:"):
|
||||
stack_mode = "server"
|
||||
else:
|
||||
stack_mode = os.environ.get("LLAMA_STACK_TEST_STACK_CONFIG_TYPE", "library_client")
|
||||
def telemetry_test_collector():
|
||||
# Stack mode is set by integration-tests.sh based on STACK_CONFIG
|
||||
stack_mode = os.environ.get("LLAMA_STACK_TEST_STACK_CONFIG_TYPE", "library_client")
|
||||
|
||||
if stack_mode == "server":
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue