-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Critical
-
Component/s: gerrit-code-review-plugin
-
None
-
Environment:Jenkins 2.580.2
gerrit-code-review 0.7.0
After upgrading our multibranch index scanning started failing with:
Last indexing: 2026-11-13 18:12:42 UTC
Index scan: error
ERROR: [Fri Nov 13 18:12:45 UTC 2026] Could not fetch branches from source gr-https://gerrit/a/<repo>
FATAL: Failed to recompute children of <repo> » <jenkins-job>
Finished: FAILURE
Believe the issue is a plugin null-dereference triggered by stale cached change refs. Clearing caches can temporarily remove the trigger, but the plugin's unguarded discovery code is the underlying defect. The durable fix is a Gerrit Code Review plugin release with a null guard/pruning behavior; a repo-specific cache cleanup is only a temporary mitigation.
In  0.7.0's `AbstractGerritSCMSource.filterRemoteReferences()` parses each cached change ref, looks it up in the map of current open changes, and immediately dereferences `changeInfo.branch` without checking whether the lookup returned null. A cached patch-set ref absent from the current Gerrit query therefore causes the observed `NullPointerException`.