From 9d5face41c3611acfea5694ff9af15dc6cef8ec5 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 26 May 2026 11:14:46 -0500 Subject: [PATCH] nixpkgs-plugin-update: keep current plugins on fetch failure Warn and reuse existing plugin data when fetch fails, so one transient failure does not drop entries from generated output. --- .../src/nixpkgs_plugin_update/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py b/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py index 4b205624417d..612fa0823bdf 100644 --- a/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py +++ b/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py @@ -974,9 +974,7 @@ class Editor: cache.store() print(f"{len(results)} of {len(current_plugins)} were checked") - # Do only partial update of out file - if len(results) != len(current_plugins): - results = self.merge_results(current_plugins, results) + results = self.merge_results(current_plugins, results) plugins, redirects = check_results(results) # Track version changes for commit message generation @@ -1016,9 +1014,11 @@ class Editor: if isinstance(plugin, Plugin) and hasattr(plugin, "normalized_name"): result[plugin.normalized_name] = (plugin_desc, plugin, redirect) elif isinstance(plugin, Exception): - # For exceptions, we can't determine the normalized_name - # Just log the error and continue - log.error(f"Error fetching plugin {plugin_desc.name}: {plugin!r}") + log.warning( + "Keeping current plugin data after error fetching %s: %r", + plugin_desc.name, + plugin, + ) else: # For unexpected types, log the issue log.error(