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

How to avoid "Checks if running on a Unix-like node" in BlueOcean output

      In our pipelines a step's output appeared recently:

      "Checks if running on a Unix-like node"

      We figured out with a single search, that it's the output of a function "isUnix()". Our problem is, that we are not calling this plugin. In the classic UI it's also visible.

      [Pipeline] isUnix
      

       Is it somehow possible to hide these messages in Blue Ocean. As I wrote, we are not calling this function, it has to pipeline or docker plugin.

      Jenkins 2.204.2 LTS

      • docker-commons:1.16
      • docker-workflow:1.21
      • pipeline-build-step:2.11

          [JENKINS-61195] How to avoid "Checks if running on a Unix-like node" in BlueOcean output

          Gabor Mandity created issue -
          Carlos Sanchez made changes -
          Assignee Original: Carlos Sanchez [ csanchez ]

          Gabor Mandity added a comment -

          We have updated our Jenkins instances to 2.204.5 LTS, but the problem is still there.

          • docker-commons:1.16
          • docker-workflow:1.23
          • pipeline-build-step:2.11

          Gabor Mandity added a comment - We have updated our Jenkins instances to 2.204.5 LTS, but the problem is still there. docker-commons:1.16 docker-workflow:1.23 pipeline-build-step:2.11
          Gabor Mandity made changes -
          Issue Type Original: Task [ 3 ] New: Bug [ 1 ]
          Florian Ramillien made changes -
          Link New: This issue is related to JENKINS-44094 [ JENKINS-44094 ]

          Florian Ramillien added a comment - - edited

          Same problem for us, we have implemented a small wrapper around sh/bat commands, and devs see a lot of uneeded 'isUnix' steps.

          def call(cmd) {
            if (isUnix()) {
              sh cmd
            } else {
              // If we use "returnStdout", need to remove command itself from stdout to work like 'sh' command
              if (cmd instanceof Map && cmd.returnStdout) {
                cmd.script = '@' + cmd.script
              }
              bat cmd
            }
          }

          If some steps can me marked as "invisible" (steps without side effects maybe ?) this could be great.

          Florian Ramillien added a comment - - edited Same problem for us, we have implemented a small wrapper around sh/bat commands, and devs see a lot of uneeded 'isUnix' steps. def call(cmd) { if (isUnix()) { sh cmd } else { // If we use "returnStdout", need to remove command itself from stdout to work like 'sh' command if (cmd instanceof Map && cmd.returnStdout) { cmd.script = '@' + cmd.script } bat cmd } } If some steps can me marked as "invisible" (steps without side effects maybe ?) this could be great.

          to mee it seems by some magic the "isUnixStep" (Step) is launched, as that seems to provide exactly this message:
          https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/steps/IsUnixStep.java

          In general it seems the "isUnix" is some API-Implementation as part of the Launcher:
          https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/Launcher.java

          I think it boils down to the fact that the docker-workflow-plugin (providing the docker.xyz steps) is using the isUnix Step implementation of the node, and not the isUnix API of the launcher in shell() method like here: https://github.com/jenkinsci/docker-workflow-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy

          now, can we do anything here?

          Peter Niederlag added a comment - to mee it seems by some magic the "isUnixStep" ( Step ) is launched, as that seems to provide exactly this message: https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/steps/IsUnixStep.java In general it seems the "isUnix" is some API-Implementation as part of the Launcher : https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/Launcher.java I think it boils down to the fact that the docker-workflow-plugin (providing the docker.xyz steps) is using the isUnix Step implementation of the node, and not the isUnix API of the launcher in shell() method like here: https://github.com/jenkinsci/docker-workflow-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy now, can we do anything here?
          Peter Niederlag made changes -
          Component/s New: docker-workflow-plugin [ 20625 ]

          Could the ticket be assigned to the main commiter of the docker-workflow-plugin since jugglefish seems to have found the problem?

           

          Boris Folgmann added a comment - Could the ticket be assigned to the main commiter of the docker-workflow-plugin since jugglefish seems to have found the problem?  

          +1 this is such a noisy useless log message.

          Abram Hemphill added a comment - +1 this is such a noisy useless log message.

            Unassigned Unassigned
            gabor_mandity Gabor Mandity
            Votes:
            10 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: