evalstate HF Staff commited on
Commit
5081f8c
·
verified ·
1 Parent(s): b5b1826

Log OAuth env when launching fast-agent subprocess

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -40,7 +40,18 @@ def _start_fast_agent() -> subprocess.Popen[str]:
40
  "--instance-scope",
41
  "request",
42
  ]
43
- return subprocess.Popen(command, text=True)
 
 
 
 
 
 
 
 
 
 
 
44
 
45
 
46
  async def _wait_for_upstream(timeout_seconds: float = 30.0) -> None:
 
40
  "--instance-scope",
41
  "request",
42
  ]
43
+ print(
44
+ (
45
+ "[STARTUP DEBUG] launching fast-agent "
46
+ f"FAST_AGENT_SERVE_OAUTH={os.getenv('FAST_AGENT_SERVE_OAUTH')!r} "
47
+ f"FAST_AGENT_OAUTH_SCOPES={os.getenv('FAST_AGENT_OAUTH_SCOPES')!r} "
48
+ f"FAST_AGENT_OAUTH_RESOURCE_URL={os.getenv('FAST_AGENT_OAUTH_RESOURCE_URL')!r} "
49
+ f"command={' '.join(command)}"
50
+ ),
51
+ file=sys.stderr,
52
+ flush=True,
53
+ )
54
+ return subprocess.Popen(command, text=True, env=dict(os.environ))
55
 
56
 
57
  async def _wait_for_upstream(timeout_seconds: float = 30.0) -> None: