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

Credentials popup does not work (regression in 2.344)

    • 2.346

      Caused by https://github.com/jenkinsci/jenkins/pull/6464

      Reproduce-able in acceptance test harness:

      plugins.SshSlavesPluginTest#customStartup

      (Use this PR as a base as ATH master has other issues: https://github.com/jenkinsci/acceptance-test-harness/pull/763)

          [JENKINS-68338] Credentials popup does not work (regression in 2.344)

          Basil Crow added a comment -

          Basil Crow added a comment - mawinter69 FYI

          Basil Crow added a comment -

          In the absence of a verified fix by the end of the week, I plan to revert jenkinsci/jenkins#6464 in jenkinsci/jenkins#6519.

          Basil Crow added a comment - In the absence of a verified fix by the end of the week, I plan to revert jenkinsci/jenkins#6464 in jenkinsci/jenkins#6519 .

          Tim Jacomb added a comment - - edited

          I've tracked the issue down.

          resolveContext in select.jelly

          Does not find the `ModelObject` anymore

          This code returns null:
          https://github.com/jenkinsci/credentials-plugin/blob/e05618c41e623cd974eef36b59e7c5bbda2a23c1/src/main/java/com/cloudbees/plugins/credentials/CredentialsSelectHelper.java#L118

          Whereas on previous core versions it would find a `ComputerSet`

          The difference is that previously the code was called on page load with the request uri of the actual page.
          Now it is rendered on demand with a stapler bound url.

          Previous request URI:
          /computer/createItem

          New one:
          /$stapler/bound/a8c8ab09-1125-44bc-acda-797cf8dca508/render

          jglick would you have any suggestions on how to fix this?

          Tim Jacomb added a comment - - edited I've tracked the issue down. resolveContext in select.jelly Does not find the `ModelObject` anymore This code returns null: https://github.com/jenkinsci/credentials-plugin/blob/e05618c41e623cd974eef36b59e7c5bbda2a23c1/src/main/java/com/cloudbees/plugins/credentials/CredentialsSelectHelper.java#L118 Whereas on previous core versions it would find a `ComputerSet` The difference is that previously the code was called on page load with the request uri of the actual page. Now it is rendered on demand with a stapler bound url. Previous request URI: /computer/createItem New one: /$stapler/bound/a8c8ab09-1125-44bc-acda-797cf8dca508/render jglick would you have any suggestions on how to fix this?

          Jesse Glick added a comment -

          Jesse Glick added a comment - Sounds like you need JENKINS-19413 . See https://github.com/jenkinsci/workflow-step-api-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/util/StaplerReferer.java for an example implementation.

          Basil Crow added a comment -

          See https://github.com/jenkinsci/workflow-step-api-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/util/StaplerReferer.java for an example implementation.

          commit 352e2848de96fb521fcdbf887037872ed8dd1f56
          Author: Jesse Glick <jglick@cloudbees.com>
          Date:   Thu Jun 4 14:00:12 2015
          
          […]
          --- a/support/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/StaplerReferer.java
          +++ b/step-api/src/main/java/org/jenkinsci/plugins/workflow/util/StaplerReferer.java
          […]
           /**
            * JENKINS-19413 workaround.
          + * Will be deleted in the future.
            */
          […]
          

          LOL

          Basil Crow added a comment - See https://github.com/jenkinsci/workflow-step-api-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/util/StaplerReferer.java for an example implementation. commit 352e2848de96fb521fcdbf887037872ed8dd1f56 Author: Jesse Glick <jglick@cloudbees.com> Date: Thu Jun 4 14:00:12 2015 […] --- a/support/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/StaplerReferer.java +++ b/step-api/src/main/java/org/jenkinsci/plugins/workflow/util/StaplerReferer.java […] /** * JENKINS-19413 workaround. + * Will be deleted in the future. */ […] LOL

          Basil Crow added a comment -

          Basil Crow added a comment - https://twitter.com/bcrow/status/102075834478768129

            basil Basil Crow
            timja Tim Jacomb
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: