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

Support multi-line parameters in parameterized remote trigger plugin

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • Jenkins: 2.332.3
      OS: Linux - 5.4.188-104.359.amzn2.x86_64
      ---
      Parameterized-Remote-Trigger:3.1.5.1

      Currently, the parameters are passed as a big multi-line string that is parsed by the plugin line-by-line.

      This has a consequence: passing multi-line parameters for the remote Jenkins instance does not work, only the first line ends up in the parameter

      I fiddled with the code and opened a pull request with a suggestion for a fix.

       

      You can find a more detailed description of the problem there too.

      Note: While fixing the parsing, I also happened to stumble on another bug linked to it that I fixed in my PR too.

          [JENKINS-68737] Support multi-line parameters in parameterized remote trigger plugin

          Cyprien Quilici created issue -
          Cyprien Quilici made changes -
          Description Original: Currently, the parameters are passed as a big multi-line string that is parsed by the plugin line-by-line.

          This has a consequence: passing multi-line parameters for the remote Jenkins instance does not work, only the first line ends up in the parameter

          I fiddled with the code and opened a [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/79|pull request] with a suggestion for a fix.

           

          You can find a more detailed description of the problem there too.

          Note: While fixing the parsing, I also happened to stumble on another [https://issues.jenkins.io/browse/JENKINS-58818|bug] linked to it that I fixed in my PR too.
          New: Currently, the parameters are passed as a big multi-line string that is parsed by the plugin line-by-line.

          This has a consequence: passing multi-line parameters for the remote Jenkins instance does not work, only the first line ends up in the parameter

          I fiddled with the code and opened a [pull request|https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/79] with a suggestion for a fix.

           

          You can find a more detailed description of the problem there too.

          Note: While fixing the parsing, I also happened to stumble on another [https://issues.jenkins.io/browse/JENKINS-58818|bug] linked to it that I fixed in my PR too.
          Cyprien Quilici made changes -
          Description Original: Currently, the parameters are passed as a big multi-line string that is parsed by the plugin line-by-line.

          This has a consequence: passing multi-line parameters for the remote Jenkins instance does not work, only the first line ends up in the parameter

          I fiddled with the code and opened a [pull request|https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/79] with a suggestion for a fix.

           

          You can find a more detailed description of the problem there too.

          Note: While fixing the parsing, I also happened to stumble on another [https://issues.jenkins.io/browse/JENKINS-58818|bug] linked to it that I fixed in my PR too.
          New: Currently, the parameters are passed as a big multi-line string that is parsed by the plugin line-by-line.

          This has a consequence: passing multi-line parameters for the remote Jenkins instance does not work, only the first line ends up in the parameter

          I fiddled with the code and opened a [pull request|https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/79] with a suggestion for a fix.

           

          You can find a more detailed description of the problem there too.

          Note: While fixing the parsing, I also happened to stumble on [another bug|https://issues.jenkins.io/browse/JENKINS-58818] linked to it that I fixed in my PR too.

          PR accepted. Thx.

          KaiHsiang Chang added a comment - PR accepted. Thx.
          KaiHsiang Chang made changes -
          Resolution New: Done [ 10000 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]
          KaiHsiang Chang made changes -
          Released As New: https://github.com/jenkinsci/parameterized-remote-trigger-plugin/releases/tag/Parameterized-Remote-Trigger-3.1.6
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]

          Wow, went faster than expected!

          I thought it would take some back and forth, this is only my second contribution to a Jenkins plugin, I'm not super confident.

          I will probably suggest another PR to polish things a bit early next week.
          The documentation is probably lacking as it is (I don't think the new parameters2 field will be described on the pipeline steps documentation page as it is, will it?).

          Also, should the other bug be closed?

          Cyprien Quilici added a comment - Wow, went faster than expected! I thought it would take some back and forth, this is only my second contribution to a Jenkins plugin, I'm not super confident. I will probably suggest another PR to polish things a bit early next week. The documentation is probably lacking as it is (I don't think the new parameters2 field will be described on the pipeline steps documentation page as it is, will it?). Also, should the other bug be closed?

          KaiHsiang Chang added a comment - - edited

          I basically trusted the test result, and I saw the modification for backward compatible at least. (With limited resources.)

          And furthermore, it's a enhancement which I like to see, although there's some dummy code change like the import orders and some code style changes which are never defined by some config. files, it still a good improvement to sustain this plugin. 

          You definitely had your use case & test  scenario already, let's move it on. 

          Look forward to your contribution. 

           

          Will close the bug you mentioned. 

          KaiHsiang Chang added a comment - - edited I basically trusted the test result, and I saw the modification for backward compatible at least. (With limited resources.) And furthermore, it's a enhancement which I like to see, although there's some dummy code change like the import orders and some code style changes which are never defined by some config. files, it still a good improvement to sustain this plugin.  You definitely had your use case & test  scenario already, let's move it on.  Look forward to your contribution.    Will close the bug you mentioned. 

          As feared, I did screw up the migration
          It only works with file parameters currently since I'm checking for null where I should check for null or empty.
          Will open a fix PR ASAP.

          Cyprien Quilici added a comment - As feared, I did screw up the migration It only works with file parameters currently since I'm checking for null where I should check for null or empty. Will open a fix PR ASAP.

          Cyprien Quilici added a comment - - edited

          https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/80 PR for the migration fix.
          I've just tested that the string parameters are migrated correctly.

          Both migrations work now.

           

          But I've discovered the transition isn't smooth at all in pipeline ATM.
          I'm working on a fix so that the migration is transparent in pipelines too.

          Cyprien Quilici added a comment - - edited https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/80 PR for the migration fix. I've just tested that the string parameters are migrated correctly. Both migrations work now.   But I've discovered the transition isn't smooth at all in pipeline ATM. I'm working on a fix so that the migration is transparent in pipelines too.

            cashlalala KaiHsiang Chang
            quilicicf Cyprien Quilici
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: