commit | 367e9c8f759aadd447f829d1d9a354513da53b50 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Fri Jun 02 11:29:41 2023 +0000 |
committer | Edwin Kempin <ekempin@google.com> | Fri Jun 02 11:32:40 2023 +0000 |
tree | 2795e381c6fc3275101f802204ca3944b0877d83 | |
parent | 2550fd8d687ba4bd55b95d8cf577af1045c84913 [diff] |
RepoUpdater: Convert ConcurrentRefUpdateException into LockFailureException Calling the RepoCommand may fail with a ConcurrentRefUpdateException that represents a LOCK_FAILURE. Convert this exception into a LockFailureException so that our auto-retrying logic for LOCK_FAILURES can recognize the LOCK_FAILURE and retry the operation, instead of failing immediately. Example stacktrace: update for foo/manifest:*:default.xml (Repo) => foo/superproject:* (ref refs/heads/main) failed: org.eclipse.jgit.api.errors.ConcurrentRefUpdateException: Cannot lock refs/heads/main. Ensure that no other process has an open file handle on the lock file refs/heads/main.lock, then you may delete the lock file and retry.. RefUpdate return code was: LOCK_FAILURE at org.eclipse.jgit.gitrepo.BareSuperprojectWriter.commitTreeOnCurrentTip(BareSuperprojectWriter.java:311) at org.eclipse.jgit.gitrepo.BareSuperprojectWriter.write(BareSuperprojectWriter.java:141) at org.eclipse.jgit.gitrepo.RepoCommand.call(RepoCommand.java:573) at com.googlesource.gerrit.plugins.supermanifest.RepoUpdater.update(RepoUpdater.java:74) at com.googlesource.gerrit.plugins.supermanifest.SuperManifestRefUpdatedListener.updateForConfig(SuperManifestRefUpdatedListener.java:424) at com.googlesource.gerrit.plugins.supermanifest.SuperManifestRefUpdatedListener.onGitReferenceUpdated(SuperManifestRefUpdatedListener.java:314) Follow the example of change I2ff60b01a in gerrit core. Change-Id: I46be2ee251bfef9dee4ea65c3f689415095501dd 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