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

Form shows one credential when xml contains none

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins 2.46.1
      ssh-agent-plugin 1.15
      ghprb 1.36.1
      master running on Ubuntu 16.04
      Chromium 57
    • Similar Issues:

      Description

      I configured a job through the web UI, checked "SSH Agent" but didn't add any credentials. The saved `config.xml` file looks good:

      <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper plugin="ssh-agent@1.15">
        <credentialIds/>
        <ignoreMissing>false</ignoreMissing>  </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>

      When opening the configure web UI again the form shows one credential entry. When saving the form now (without changing anything) the credential entry is being stored in the `config.xml`:

      <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper plugin="ssh-agent@1.15">
        <credentialIds>
          <string>xxxxx</string>
        </credentialIds>
        <ignoreMissing>false</ignoreMissing>  </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>

      The expectation is that:

      • if the `config.xml` doesn't contain a credential entry the web ui should not show one and
      • opening the configure form and saving it without making any changes shouldn't add a credential entry

        Attachments

          Activity

          Hide
          dthomas Dirk Thomas added a comment -

          I have noticed the same problem in the `ghprb` plugin. When saving the settings with no "Blacklist Target Branches", reloading the form, it shows one empty entry for blacklisting target branches. This indicates that it might be a generic problem in the settings form.

          Show
          dthomas Dirk Thomas added a comment - I have noticed the same problem in the `ghprb` plugin. When saving the settings with no "Blacklist Target Branches", reloading the form, it shows one empty entry for blacklisting target branches. This indicates that it might be a generic problem in the settings form.

            People

            • Assignee:
              Unassigned
              Reporter:
              dthomas Dirk Thomas
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: