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

isValid() fails with RESTListParam

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None

      https://github.com/jenkinsci/pipeline-build-step-plugin/pull/45 which started using isValid() does not seem to work well with the rest-list-parameter plugin. 

      We have a pipeline that builds a new version, adds a tag to github, confirms the new tag is returned by the github api, then triggers a deploy pipeline via build(). The call to build fails with

      ERROR: Invalid parameter value: {"type": "RestListParameterValue", "name:": "TAG", "value": "newly-created-tag"}
      
      

      The TAG parameter in the downstream pipeline is a rest-list-parameter configured to query github for a list of existing tags. 

      Triggering the downstream pipeline manually works. 

      I had the same issue with both 539.v8c889169451f and 540.vb_e8849e1a_b_d8. Reverting to 516.v8ee60a_81c5b_9 fixed my issue in both upgrade attempts.

       

      rest-list-parameter has some caching options, but I have disabled them to confirm I'm not seeing an issue with the new value not being found in cache. The api should be queried each time values are needed.

       

      My theory on what is happening is the RestListParam doesn't have any stored state on valid parameters and the call to isValid() does not trigger the http call to determine what values are valid. So my new tag is not found in an empty list. 

            Unassigned Unassigned
            jo2y jo2y
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: