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

Build description longer than 30 chars has hex zero width space added

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Jenkins 1.596.1, 2.124
    • Jenkins 2.276

      We use a Groovy script to write the package version into the build description of a job after it completes. Users then copy this from the Jenkins UI and paste it to perform a deploy. I have discovered occasional strange issues with this where what seems to be a valid version number is not found by our deploy system. Eventually I figured out that Jenkins is inserting a

      ​

      in the string if it exceeds 30 chars. This is invisible (obviously) in the UI but gets captured when the text is selected and copied/pasted (at least with Chrome on MacOS). This is a problem because this copy-paste workflow has been embedded here for several years, and a recent Jenkins upgrade has thrown this entropy into it

          [JENKINS-28022] Build description longer than 30 chars has hex zero width space added

          Owen Mehegan created issue -

          Daniel Beck added a comment -

          Why is this assigned to me?

          Daniel Beck added a comment - Why is this assigned to me?
          Daniel Beck made changes -
          Assignee Original: Daniel Beck [ danielbeck ]
          Description Original: We use a Groovy script to write the package version into the build description of a job after it completes. Users then copy this from the Jenkins UI and paste it to perform a deploy. I have discovered occasional strange issues with this where what seems to be a valid version number is not found by our deploy system. Eventually I figured out that Jenkins is inserting a ​ in the string if it exceeds 30 chars. This is invisible (obviously) in the UI but gets captured when the text is selected and copied/pasted (at least with Chrome on MacOS). This is a problem because this copy-paste workflow has been embedded here for several years, and a recent Jenkins upgrade has thrown this entropy into it :) New: We use a Groovy script to write the package version into the build description of a job after it completes. Users then copy this from the Jenkins UI and paste it to perform a deploy. I have discovered occasional strange issues with this where what seems to be a valid version number is not found by our deploy system. Eventually I figured out that Jenkins is inserting a {code}​{code} in the string if it exceeds 30 chars. This is invisible (obviously) in the UI but gets captured when the text is selected and copied/pasted (at least with Chrome on MacOS). This is a problem because this copy-paste workflow has been embedded here for several years, and a recent Jenkins upgrade has thrown this entropy into it :)

          Daniel Beck added a comment -

          Workaround: Copy it from the build index page.

          Daniel Beck added a comment - Workaround: Copy it from the build index page.

          Kevin Wang added a comment -

          Anyone looking at this problem? We are using copy-paste workflow and encountered this problem

          Kevin Wang added a comment - Anyone looking at this problem? We are using copy-paste workflow and encountered this problem

          Owen Mehegan added a comment -

          tfennelly do you have any thoughts on this? In Chrome this feature does not actually cause the text to wrap, so we get zero width spaces in the string and nothing else in return, it seems.

          Owen Mehegan added a comment - tfennelly do you have any thoughts on this? In Chrome this feature does not actually cause the text to wrap, so we get zero width spaces in the string and nothing else in return, it seems.

          Owen Mehegan added a comment - - edited

          I take it back - if the build description is just a steady string of alpha characters, it seems to wrap as intended. But when we set the description to the version string that we generate internally (our use case for this), it doesn't wrap at 30 chars. Maybe this is because we always have . and + in the string, among other non-alphanum characters. I just wish there was a better way to get the text to wrap nicely without screwing up the string when we copy and paste it. I had to add a bunch of defensive code to our deploy system so it wouldn't choke on these strings.

          Owen Mehegan added a comment - - edited I take it back - if the build description is just a steady string of alpha characters, it seems to wrap as intended. But when we set the description to the version string that we generate internally (our use case for this), it doesn't wrap at 30 chars. Maybe this is because we always have . and + in the string, among other non-alphanum characters. I just wish there was a better way to get the text to wrap nicely without screwing up the string when we copy and paste it. I had to add a bunch of defensive code to our deploy system so it wouldn't choke on these strings.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 162624 ] New: JNJira + In-Review [ 180996 ]
          Daniel Beck made changes -
          Link New: This issue is blocking JENKINS-40663 [ JENKINS-40663 ]
          Mark Hudson made changes -
          Link New: This issue is duplicated by JENKINS-40663 [ JENKINS-40663 ]

            Unassigned Unassigned
            owenmehegan Owen Mehegan
            Votes:
            19 Vote for this issue
            Watchers:
            25 Start watching this issue

              Created:
              Updated:
              Resolved: