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

Source Code Management for build job is forgotten on save

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: core
    • Environment:
    • Similar Issues:
    • Released As:
      Jenkins 2.225

      Description

       Source Code Management for build, seems to be forgotten when saving or applying and then leaving page. All other changes on page seem to be correctly stored, but when reloading page SCM is reset to None. This error is not git specific, and also is present for mercurial.

      Issue is present on v.2.224 but not on v.2.223.
      Fixed issue by rolling back to previous version.

        Attachments

        1. after load.PNG
          after load.PNG
          6 kB
        2. screenshot-1.png
          screenshot-1.png
          231 kB
        3. screenshot-2.png
          screenshot-2.png
          122 kB
        4. SourceCodeManagement.png
          SourceCodeManagement.png
          34 kB
        5. this.png
          this.png
          66 kB

          Issue Links

            Activity

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            JENKINS-51495 is suspected to be the root cause, because it modifies descriptorRadioList  being used in SCM configuration sections

            Show
            oleg_nenashev Oleg Nenashev added a comment - JENKINS-51495 is suspected to be the root cause, because it modifies descriptorRadioList  being used in SCM configuration sections
            Hide
            markewaite Mark Waite added a comment -

            Thanks Oleg Nenashev. I've confirmed that I can duplicate the problem with the tip of the master branch and it is no longer visible if I revert the JENKINS-51495 change. Should I submit a pull request to revert the change or would you prefer to approach it differently?

            Show
            markewaite Mark Waite added a comment - Thanks Oleg Nenashev . I've confirmed that I can duplicate the problem with the tip of the master branch and it is no longer visible if I revert the JENKINS-51495 change . Should I submit a pull request to revert the change or would you prefer to approach it differently?
            Hide
            timja Tim Jacomb added a comment - - edited

            Looking at it in a debugger:

            String descriptorId = config.getString("value");

            is equal to 1

            'this' returns a list with a null scm and a git scm

            getting the id on the git scm returns the class name

            and
            1 is not equal to hudson.plugins.git.GitSCM

            so the check fails and it defaults to the first item in the list (nullscm)

            Show
            timja Tim Jacomb added a comment - - edited Looking at it in a debugger: String descriptorId = config.getString("value"); is equal to 1 'this' returns a list with a null scm and a git scm getting the id on the git scm returns the class name and 1 is not equal to hudson.plugins.git.GitSCM so the check fails and it defaults to the first item in the list (nullscm)
            Hide
            timja Tim Jacomb added a comment -

            PR submitted: https://github.com/jenkinsci/jenkins/pull/4560

            I had a look in core and couldn't see any other issues with this.

            Show
            timja Tim Jacomb added a comment - PR submitted: https://github.com/jenkinsci/jenkins/pull/4560 I had a look in core and couldn't see any other issues with this.
            Hide
            markewaite Mark Waite added a comment -

            Merged for Jenkins 2.225

            Show
            markewaite Mark Waite added a comment - Merged for Jenkins 2.225

              People

              • Assignee:
                markewaite Mark Waite
                Reporter:
                martin_breistein Martin Breistein
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: