stable

Forked from tuleap/stable

Clone or download

Read-only

story #2967 - Serialize gitolite events

Sevral concurrent processes accessing the same gitolite admin repository in the same time seems to lead to race conditions and sometime might crash gitolite authorized_keys. Furthermore, as the number of git repositories grow, modifications made on gitolite admin repo takes time to push (compile time in gitolite to generate the permission schema). With this change, all gitolite admin operations (ssh keys modifications, creation of repository, deletion, update of description, update of permissions, update of mailing list details, move to gerrit, etc) are done one after another (serialized), in background (system event). For end user, it means a UI with better reactivity but a little bit of delay to actually get the things propagated at git/gitolite level (usually a couple of minutes). Change-Id: I5d58652690feaf2c756b04db30889639334aca40

Modified Files

Name
M ChangeLog +1 −0 Go to diff View file
M VERSION +1 −1 Go to diff View file
M plugins/git/ChangeLog +3 −0 Go to diff View file
M plugins/git/VERSION +1 −1 Go to diff View file
M plugins/git/db/install.sql +1 −0 Go to diff View file
A plugins/git/db/mysql/updates/2013/201304111018_add_remote_server_key.php +83 −0 Go to diff View file
M plugins/git/include/Git.class.php +23 −4 Go to diff View file
M plugins/git/include/Git/Admin.class.php +8 −8 Go to diff View file
M plugins/git/include/Git/Driver/Gerrit.class.php +32 −5 Go to diff View file
M plugins/git/include/Git/Driver/Gerrit/RemoteSSHCommand.class.php +8 −1 Go to diff View file
A plugins/git/include/Git/Driver/Gerrit/UserAccountManager.class.php +177 −0 Go to diff View file
M plugins/git/include/Git/RemoteServer/Dao.class.php +33 −9 Go to diff View file
D plugins/git/include/Git/RemoteServer/Gerrit/ReplicationSSHKeyFactory.class.php +0 −139 Go to diff View file
M plugins/git/include/Git/RemoteServer/GerritServer.class.php +4 −4 Go to diff View file
M plugins/git/include/Git/RemoteServer/GerritServerFactory.class.php +23 −20 Go to diff View file
A plugins/git/include/Git/SystemEventManager.class.php +109 −0 Go to diff View file
A plugins/git/include/Git/UserAccountManager.class.php +97 −0 Go to diff View file
A plugins/git/include/Git/UserSynchronisationException.class.php +23 −0 Go to diff View file
M plugins/git/include/GitActions.class.php +22 −44 Go to diff View file
M plugins/git/include/GitBackend.class.php +10 −13 Go to diff View file
M plugins/git/include/GitDao.class.php +19 −1 Go to diff View file
M plugins/git/include/GitDriver.class.php +9 −0 Go to diff View file
M plugins/git/include/GitRepository.class.php +9 −1 Go to diff View file
M plugins/git/include/GitRepositoryFactory.class.php +11 −3 Go to diff View file
M plugins/git/include/GitRepositoryManager.class.php +27 −14 Go to diff View file
M plugins/git/include/GitViews/ShowRepo/Content.class.php +13 −1 Go to diff View file
M plugins/git/include/Git_Backend_Gitolite.class.php +33 −36 Go to diff View file
M plugins/git/include/Git_Backend_Interface.php +10 −8 Go to diff View file
M plugins/git/include/Git_GitoliteDriver.class.php +17 −1 Go to diff View file
M plugins/git/include/Git_Gitolite_SSHKeyDumper.class.php +4 −1 Go to diff View file
M plugins/git/include/Git_Gitolite_SSHKeyMassDumper.class.php +4 −1 Go to diff View file
M plugins/git/include/autoload.php +14 −5 Go to diff View file
A plugins/git/include/events/SystemEvent_GIT_GERRIT_ADMIN_KEY_DUMP.class.php +73 −0 Go to diff View file
M plugins/git/include/events/SystemEvent_GIT_GERRIT_MIGRATION.class.php +1 −1 Go to diff View file
M plugins/git/include/events/SystemEvent_GIT_REPO_ACCESS.class.php +1 −0 Go to diff View file
D plugins/git/include/events/SystemEvent_GIT_REPO_CREATE.class.php +0 −111 Go to diff View file
M plugins/git/include/events/SystemEvent_GIT_REPO_DELETE.class.php +1 −1 Go to diff View file
A plugins/git/include/events/SystemEvent_GIT_REPO_FORK..php +78 −0 Go to diff View file
A plugins/git/include/events/SystemEvent_GIT_REPO_UPDATE.class.php +73 −0 Go to diff View file
M plugins/git/include/gitPlugin.class.php +264 −49 Go to diff View file
M plugins/git/site-content/en_US/git.tab +6 −0 Go to diff View file
M plugins/git/site-content/fr_FR/git.tab +7 −0 Go to diff View file
M plugins/git/tests/Git/AdminTest.php +15 −20 Go to diff View file
M plugins/git/tests/Git/Driver/Gerrit/ProjectCreatorTest.php +1 −2 Go to diff View file
M plugins/git/tests/Git/Driver/Gerrit/RemoteSSHCommandTest.php +1 −3 Go to diff View file
A plugins/git/tests/Git/Driver/Gerrit/UserAccountManagerTest.php +219 −0 Go to diff View file
D plugins/git/tests/Git/RemoteServer/Gerrit/ReplicationSSHKeyFactoryTest.php +0 −332 Go to diff View file
M plugins/git/tests/Git/RemoteServer/GerritServerFactoryTest.php +36 −16 Go to diff View file
M plugins/git/tests/Git/RemoteServer/GerritServerTest.php +6 −6 Go to diff View file
A plugins/git/tests/Git/SystemEventManagerTest.php +154 −0 Go to diff View file
A plugins/git/tests/Git/UserAccountManagerTest.php +119 −0 Go to diff View file
M plugins/git/tests/GitActionsTest.php +85 −88 Go to diff View file
M plugins/git/tests/GitRepositoryFactoryTest.php +14 −14 Go to diff View file
M plugins/git/tests/GitRepositoryManagerTest.php +128 −25 Go to diff View file
M plugins/git/tests/Git_Backend_GitoliteTest.php +32 −20 Go to diff View file
M plugins/git/tests/Git_Gitolite_SSHKeyDumperTest.php +4 −0 Go to diff View file
M plugins/git/tests/Git_Gitolite_SSHKeyMassDumperTest.php +4 −1 Go to diff View file
A plugins/git/tests/events/SystemEvent_GIT_GERRIT_ADMIN_KEY_DUMPTest.php +113 −0 Go to diff View file
A plugins/git/tests/events/SystemEvent_GIT_REPO_FORKTest.php +69 −0 Go to diff View file
A plugins/git/tests/events/SystemEvent_GIT_REPO_UPDATETest.php +61 −0 Go to diff View file
A plugins/git/tests/gitPluginTest.php +214 −0 Go to diff View file
M plugins/git/www/themes/default/css/style.css +6 −0 Go to diff View file
M site-content/fr_FR/account/account.tab +1 −0 Go to diff View file
M src/common/backend/BackendSystem.class.php +8 −2 Go to diff View file
M src/common/event/Event.class.php +9 −0 Go to diff View file
M src/common/system_event/SystemEventManager.class.php +1 −1 Go to diff View file
M src/common/system_event/include/SystemEvent_EDIT_SSH_KEYS.class.php +12 −2 Go to diff View file
M src/common/user/User.class.php +14 −2 Go to diff View file
M src/common/user/UserManager.class.php +11 −2 Go to diff View file
M src/www/account/index.php +7 −0 Go to diff View file
M tests/simpletest/common/user/UserTest.php +2 −2 Go to diff View file
M tests/simpletest/common/user/UserTestBuilder.php +1 −1 Go to diff View file
M tools/utils/purge_bad_sshkeys.php +2 −2 Go to diff View file