Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-25786

Renaming Job Causes a poisoned commitQueue

    Details

    • Similar Issues:

      Description

      Renaming a job causes a commit to be added to the scm-sync plug-in's internal commit queue (see ScmSyncConfigurationBusiness.java) that fails due to the issue documented in JENKINS-15128 - Renaming job doesn't work with Git. Thereafter, even if one cleans up the checkoutConfiguration directory and manually syncs everything up, it become necessary to restart Jenkins because the failed commit poisons the queue. The remaining issue with 15128 (not calling git rm with the recursive flag) means the commit can never succeed. All subsequent configuration changes get stuck behind it.

      There needs to be a way to reset the queue queue w/o restarting Jenkins.

        Attachments

          Issue Links

            Activity

            Hide
            rodrigc Craig Rodrigues added a comment -

            Fixed in 0.0.9

            Show
            rodrigc Craig Rodrigues added a comment - Fixed in 0.0.9
            Hide
            trbaker Trevor Baker added a comment -

            We're still having issues though the job to be renamed contains a space in the name, which is issue JENKINS-24686. JENKINS-24686 is marked fixed, though I am still seeing that same stacktrace on 0.0.9

            Show
            trbaker Trevor Baker added a comment - We're still having issues though the job to be renamed contains a space in the name, which is issue JENKINS-24686 . JENKINS-24686 is marked fixed, though I am still seeing that same stacktrace on 0.0.9
            Hide
            colonelcoder David Cullen added a comment -

            I use Gitlab, and I have to fix this by

            1. Uninstalling the "SCM Sync Configuration Plugin"
            2. Restarting Jenkins
            3. sudo su - tomcat7
            4. pushd .jenkins
            5. rm -fr scm-sync-configuration*
            6. Restarting Jenkins
            7. Renaming the repository on GitLab
            8. Creating a new repository on GitLab with the original name
            9. Re-installing the "SCM Sync Configuration Plugin"
            10. Configure the "SCM Sync Configuration Plugin"
            11. pushd scm-sync-configuration/checkoutConfiguration
            12. git remote add scm-sync-configuration-old <gitlab-url>
            13. git fetch scm-sync-configuration-old
            14. git merge scm-sync-configuration-old/master
            15. git remote remove scm-sync-configuration-old
            16. git branch --unset-upstream

            There is a mix of GitLab operations and shell commands and obviously I am using tomcat to run Jenkins. However, this might work for someone else, so I am putting the information here. Doing all of that preserves the history that I would normally lose.

            I wish there was a way to use Jenkins security to only allow copying repositories and block renaming.

            Show
            colonelcoder David Cullen added a comment - I use Gitlab, and I have to fix this by Uninstalling the "SCM Sync Configuration Plugin" Restarting Jenkins sudo su - tomcat7 pushd .jenkins rm -fr scm-sync-configuration* Restarting Jenkins Renaming the repository on GitLab Creating a new repository on GitLab with the original name Re-installing the "SCM Sync Configuration Plugin" Configure the "SCM Sync Configuration Plugin" pushd scm-sync-configuration/checkoutConfiguration git remote add scm-sync-configuration-old <gitlab-url> git fetch scm-sync-configuration-old git merge scm-sync-configuration-old/master git remote remove scm-sync-configuration-old git branch --unset-upstream There is a mix of GitLab operations and shell commands and obviously I am using tomcat to run Jenkins. However, this might work for someone else, so I am putting the information here. Doing all of that preserves the history that I would normally lose. I wish there was a way to use Jenkins security to only allow copying repositories and block renaming.
            Hide
            cobexer Ing. Christoph Obexer added a comment -

            David Cullen Have you tried to just git commit the changes that are already in the scm-sync-configuration/checkoutConfiguration directory? modifying jobs with spaces always causes this for me and just committing manually fixes it for me.

            Show
            cobexer Ing. Christoph Obexer added a comment - David Cullen Have you tried to just git commit the changes that are already in the scm-sync-configuration/checkoutConfiguration directory? modifying jobs with spaces always causes this for me and just committing manually fixes it for me.
            Hide
            colonelcoder David Cullen added a comment - - edited

            Hello, Ing. Christoph Obexer, when I have this problem, there are no changes that need to be committed. If I run "git status" it tells me that I am behind the remote by N commits. The plugin stops pushing to the remote after a job is renamed and nothing I do (besides the steps I listed) fixes it. I am just glad that I figured out a way to recover the GIT history. Before I found out how to merge two repositories, I was losing the commit history when I deleted the repository from GitLab.

            Show
            colonelcoder David Cullen added a comment - - edited Hello, Ing. Christoph Obexer , when I have this problem, there are no changes that need to be committed. If I run "git status" it tells me that I am behind the remote by N commits. The plugin stops pushing to the remote after a job is renamed and nothing I do (besides the steps I listed) fixes it. I am just glad that I figured out a way to recover the GIT history. Before I found out how to merge two repositories, I was losing the commit history when I deleted the repository from GitLab.

              People

              • Assignee:
                Unassigned
                Reporter:
                kbaltrinic Kenneth Baltrinic
              • Votes:
                9 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated: