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

The file field on FileCredentialsImpl of class FileItem is not describable

    XMLWordPrintable

Details

    • 2.3.3

    Description

      Seems like the plain-credential plugin is not compatible with JCasC.

      At least JCasC export cannot describe FileItem class.

      plain-credential is using a non describable interface of FileItem fromĀ org.apache.commons.fileupload.FileItem not sure how to convert this type to a describable type.

      Attachments

        Activity

          casz Joseph Petersen (old) created issue -
          casz Joseph Petersen (old) made changes -
          Field Original Value New Value
          Assignee Jesse Glick [ jglick ]

          jglick do you have any suggestion how I could contribute to plain-credentials-plugin to make it even more JCasC compatible?

          casz Joseph Petersen (old) added a comment - jglick do you have any suggestion how I could contribute to plain-credentials-plugin to make it even more JCasC compatible?
          casz Joseph Petersen (old) made changes -
          Summary The file field of class FileItem is not describable The file field on FileCredentialsImpl of class FileItem is not describable
          jglick Jesse Glick added a comment -

          FileCredentialsImpl is weird. Definitely not a generally supported usage of @DataBoundConstructor. You cannot and should not attempt to export a FileItem; it is just there to handle browser file uploads. From the perspective of JCasC, ignore the file parameter and use only fileName + secretBytes (the things you actually have getters for anyway).

          You may need to be adding SecretBytes support to JCasC for the first time. Created by stephenconnolly. AFAIK used only by FileCredentialsImpl and CertificateCredentialsImpl.

          jglick Jesse Glick added a comment - FileCredentialsImpl is weird. Definitely not a generally supported usage of @DataBoundConstructor . You cannot and should not attempt to export a FileItem ; it is just there to handle browser file uploads. From the perspective of JCasC, ignore the file parameter and use only fileName + secretBytes (the things you actually have getters for anyway). You may need to be adding SecretBytes support to JCasC for the first time. Created by stephenconnolly . AFAIK used only by FileCredentialsImpl and CertificateCredentialsImpl .
          jglick Jesse Glick made changes -
          Assignee Jesse Glick [ jglick ]
          jglick Jesse Glick made changes -
          Component/s configuration-as-code-plugin [ 23170 ]
          jglick Jesse Glick added a comment -

          To be clear, I do not believe any patch to plain-credentials is possible, at least without a rewrite of file uploads in Stapler. configuration-as-code is just going to have to deal with what is there.

          jglick Jesse Glick added a comment - To be clear, I do not believe any patch to plain-credentials is possible, at least without a rewrite of file uploads in Stapler. configuration-as-code is just going to have to deal with what is there.
          jetersen Joseph Petersen made changes -
          Assignee Joseph Petersen [ jetersen ]
          jetersen Joseph Petersen made changes -
          Assignee Joseph Petersen [ jetersen ]
          timja Tim Jacomb added a comment -

          This is fixed by adjusting the converter in the credentials-plugin
          https://github.com/jenkinsci/credentials-plugin/pull/135

          released in 2.3.3

          timja Tim Jacomb added a comment - This is fixed by adjusting the converter in the credentials-plugin https://github.com/jenkinsci/credentials-plugin/pull/135 released in 2.3.3
          timja Tim Jacomb made changes -
          Assignee Tim Jacomb [ timja ]
          timja Tim Jacomb made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          timja Tim Jacomb made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          timja Tim Jacomb made changes -
          Released As 2.3.3
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Resolved [ 5 ]
          timja Tim Jacomb made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

            timja Tim Jacomb
            casz Joseph Petersen (old)
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: