mirror of
https://github.com/openai/codex.git
synced 2026-11-28 23:34:06 +00:00
Upgrade Git marketplaces from merged configuration (#42149)
## Why Configured Git marketplaces may be defined outside the user config, but those definitions could not download or update their snapshots. ## What changed - Select marketplace source, ref, and sparse-path settings from the effective merged configuration for startup synchronization and explicit upgrades. - Preserve the initiating operation's configuration loader and overrides when reloading before activation. - Roll back activation if the marketplace definition changed or configuration can no longer be loaded, without copying settings into the user config. ## Testing - Cover system-defined marketplaces, CLI overrides, startup fallback after invalid user configuration, and rollback after configuration changes. GitOrigin-RevId: 53d1eecf68a91ce2aa8430e5749d78697bfcd821
This commit is contained in:
1 parent
e576993911
commit
68c9556cdf
17 files changed
+387
-82
No files matched your search
@@ -1,4 +1,5 @@
|
||||
use super::*;
|
||||
use crate::plugin_config_reload;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub(crate) struct MarketplaceRequestProcessor {
|
||||
@@ -78,11 +79,14 @@ impl MarketplaceRequestProcessor {
|
||||
let plugins_manager = self.thread_manager.plugins_manager();
|
||||
let MarketplaceUpgradeParams { marketplace_name } = params;
|
||||
let plugins_input = config.plugins_config_input();
|
||||
let reload_config =
|
||||
plugin_config_reload::for_cwd(self.config_manager.clone(), config.cwd.clone());
|
||||
|
||||
let outcome = tokio::task::spawn_blocking(move || {
|
||||
plugins_manager.upgrade_configured_marketplaces_for_config(
|
||||
&plugins_input,
|
||||
marketplace_name.as_deref(),
|
||||
&reload_config,
|
||||
)
|
||||
})
|
||||
.await
|
||||
|
||||
Reference in new issue
Block a user