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

null pointer com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretUtils.getKeyName(SecretUtils.java:186)

      Error when a secret doesn't have an annotation.  As a workaround I added a dummy annotation to all my secrets, i.e.

      kubectl annotate secret --all jenkins.io/foo=bar
      

      Issue seems to be here not checking that annotations can be null https://github.com/jenkinsci/kubernetes-credentials-provider-plugin/blob/82b67a06d24b8cc500856e46f3328337e58a63ca/src/main/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/SecretUtils.java#L186

          [JENKINS-54313] null pointer com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretUtils.getKeyName(SecretUtils.java:186)

          James Rawlings added a comment - PR with a fix submitted https://github.com/jenkinsci/kubernetes-credentials-provider-plugin/pull/20  

          James Nord added a comment - - edited

          a secret is required to have the annotation for its display name if it is labelled as a Jenkins credential.

           

          It shouldn't blow up but it should also not be tollerant to this.

           

          If this prevents handling of the specific credential but all others are ok then this is ok - but it should throw a more meaningful error message in this case

          James Nord added a comment - - edited a secret is required to have the annotation for its display name if it is labelled as a Jenkins credential.   It shouldn't blow up but it should also not be tollerant to this.   If this prevents handling of the specific credential but all others are ok then this is ok - but it should throw a more meaningful error message in this case

          James Nord added a comment -

          available in 0.11 or higher

          James Nord added a comment - available in 0.11 or higher

            Unassigned Unassigned
            jrawlings James Rawlings
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: