SuperManifestRefUpdatedListener: Remove unneeded caching of config

SuperManifestRefUpdatedListener caches the supermanifest configuration
that is read from the All-Projects project. Since
SuperManifestRefUpdatedListener is a singleton it must take care to
update the cached configuration whenever the configuration in the
repository is updated. At the moment the plugin does this when a
GitReferenceUpdated event for refs/meta/config in All-Projects is
received, but it misses updates that happen behind Gerrit's back. For
updates that go through Gerrit the invalidation of the cached entries in
SuperManifestRefUpdatedListener should work, but also here we observe
that sometimes this doesn't work and then the plugin uses a stale

Caching the config in SuperManifestRefUpdatedListener is not needed, as
all config files are already cached in the project cache. So the
supermanifest plugin can just always retrieve it from there. Entries in
the project cache have the SHA1 of the refs/meta/config branch in the
key so that the cache entries are automatically refreshed when the SHA1
of refs/meta/config has changed (even behind Gerrit's back).

With this change we are dropping the config caching in
SuperManifestRefUpdatedListener since it is error-prone and instead we
always read the supermanifest configuration via
cfgFactory.getProjectPluginConfig whenever it is needed. This way we
should no longer see staleness issues with this config.

While we are here, also improve some error message and variable names.

Bug: Google b/241001040
Change-Id: I894f819e011b68b2dff9406995182881f6592998
Signed-off-by: Edwin Kempin <>
1 file changed
tree: 7fef4582de3a882009d65347147c4e020afde673
  1. java/
  2. javatests/
  3. BUILD
  4. external_plugin_deps.bzl

The plugin will update a superproject to contain the submodules defined in the manifest XML file whenever the manifest repo is changed.

For more information see the documentation or the build instructions