acoustic-carpenter-78188
06/26/2026, 7:43 PMflyte run, setting both LOG_LEVEL and USER_LOG_LEVEL in the shell only forwards LOG_LEVEL to the task pod — USER_LOG_LEVEL is dropped.
LOG_LEVEL=DEBUG USER_LOG_LEVEL=DEBUG flyte run ... # only LOG_LEVEL reaches the pod
flyte run -e LOG_LEVEL=DEBUG -e USER_LOG_LEVEL=DEBUG # both reach the pod
Root cause: in _Runner._build_env_dict, LOG_LEVEL always gets injected (it falls back to logger.getEffectiveLevel()), but USER_LOG_LEVEL was only set when explicitly threaded through with_runcontext — which the CLI doesn't do.
What
_build_env_dict now mirrors LOG_LEVEL for `USER_LOG_LEVEL`: falls back to user_logger.getEffectiveLevel(), so a shell-set value reaches the pod on both the CLI and direct-script paths.
Tests
• tests/flyte/test_run_log_env.py — USER_LOG_LEVEL fallback / precedence in _build_env_dict.
flyteorg/flyte-sdkacoustic-carpenter-78188
07/27/2026, 5:13 PM