• Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Critical Critical
    • None
    • Jenkins v 1.552 scm-sync v 0.0.8

      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.

          [JENKINS-25786] Renaming Job Causes a poisoned commitQueue

          thedug added a comment -

          +1 I also noticed that the plugin is only committing changes when I save jenkins settings not when saving changes to projects (I don't even get the commit message popup). I'm not sure when that happened but I have a suspicion that it was related to this.

          thedug added a comment - +1 I also noticed that the plugin is only committing changes when I save jenkins settings not when saving changes to projects (I don't even get the commit message popup). I'm not sure when that happened but I have a suspicion that it was related to this.

          Daniel Beck added a comment -

          Updating the priority of this because it is causing backups to fail across our enterprise.

          Workaround: Disable this plugin.

          Daniel Beck added a comment - Updating the priority of this because it is causing backups to fail across our enterprise. Workaround: Disable this plugin.

          Trevor Baker added a comment - - edited

          When this happens I see the old named job's config.xml committed properly though the add of the newly named file doesn't happen. You end with with the renamed file and path untracked in scm-sync-configuration/checkoutConfiguration

          This is how I fix it:

          ssh jenkins
          sudo su jenkins -s /bin/bash
          cd ~/scm-sync-configuration/checkoutConfiguration/
          git status  # see untracked files
          git add -a
          git commit -a -m “fix this busted stuff”
          git push origin master
          # all good
          

          Then restart Jenkins.

          Trevor Baker added a comment - - edited When this happens I see the old named job's config.xml committed properly though the add of the newly named file doesn't happen. You end with with the renamed file and path untracked in scm-sync-configuration/checkoutConfiguration This is how I fix it: ssh jenkins sudo su jenkins -s /bin/bash cd ~/scm-sync-configuration/checkoutConfiguration/ git status # see untracked files git add -a git commit -a -m “fix this busted stuff” git push origin master # all good Then restart Jenkins.

          lol

          Stefan Schäfer added a comment - lol

          Fixed in 0.0.9

          Craig Rodrigues added a comment - Fixed in 0.0.9

          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

          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

          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.

          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.

          colonelcoder 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.

          Ing. Christoph Obexer added a comment - colonelcoder 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.

          David Cullen added a comment - - edited

          Hello, cobexer, 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.

          David Cullen added a comment - - edited Hello, cobexer , 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.

          Mark Waite added a comment -

          The scm sync configuration plugin is deprecated. No further work is expected on the plugin.

          Users of this plugin are encouraged to migrate their jobs to Pipeline Plugin, so that their jobs will be specified in pipeline code that can be checked into an SCM, all without using the SCM Sync configuration plugin.

          Users of this plugin are also encouraged to use the Configuration as Code Plugin to specify the configuration of their Jenkins server in a file which can be checked into an SCM, all without using the SCM Sync configuration plugin.

          Mark Waite added a comment - The scm sync configuration plugin is deprecated. No further work is expected on the plugin. Users of this plugin are encouraged to migrate their jobs to Pipeline Plugin, so that their jobs will be specified in pipeline code that can be checked into an SCM, all without using the SCM Sync configuration plugin. Users of this plugin are also encouraged to use the Configuration as Code Plugin to specify the configuration of their Jenkins server in a file which can be checked into an SCM, all without using the SCM Sync configuration plugin.

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

              Created:
              Updated:
              Resolved: