commit | 61be8678e6be23a93dd6854c1283e144c32a0865 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Tue May 30 11:07:19 2023 +0000 |
committer | Edwin Kempin <ekempin@google.com> | Tue May 30 11:30:02 2023 +0000 |
tree | 7fef4582de3a882009d65347147c4e020afde673 | |
parent | 4ffcbb81874a1805a708523da4effff74e366fe2 [diff] |
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 configuration. 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 <ekempin@google.com>
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