mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
Share cached exec-server environment info with Arc (#49798)
## What changed Return `Arc<EnvironmentInfo>` from `ExecServerClient::environment_info()` so repeated reads and cloned clients share cached metadata without cloning its contents. Wrap metadata from initialization and lazy RPC fetches in `Arc`, while preserving the owned return value in `LazyRemoteExecServerClient`. ## Testing Extend the cache test to assert pointer identity across cloned clients for both initialization-provided metadata and lazy fetching after connecting to a legacy server. GitOrigin-RevId: 3f56f4d51a4aebc0c4821c0b128a70efb23933d4
This commit is contained in:
committed by
copyberry
parent
5ca55db09c
commit
c538fbabe5
@@ -267,7 +267,7 @@ metrics_exporter = {{ otlp-http = {{ endpoint = "{collector_url}/v1/metrics", pr
|
||||
prepend_path_dirs: environment_info.prepend_path_dirs.clone(),
|
||||
..EnvironmentInfo::local()
|
||||
};
|
||||
assert_eq!(environment_info, expected_info);
|
||||
assert_eq!(environment_info.as_ref(), &expected_info);
|
||||
std::fs::remove_file(&manifest)?;
|
||||
assert_eq!(client.force_environment_info().await?, expected_info);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user