The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

      If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

      This is a snippet from the attached pipeline

      steps
      {
       println('call cps')
       cps() println('call non-cps')
       non_cps()
       println('exit pipeline') 
      }
      

       

      The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:

      *cps()
      {
         println("enter cps")
         sh "ls"
         println("exit cps") 
      }
      

      And this is the relevant part of the build log

      00:00:05.956 call cps[Pipeline] echo

      00:00:06.621 cps - enter[Pipeline] sh

      00:00:07.032 [workspace@2] Running shell script*

      00:00:07.288* + ls[Pipeline] echo

      00:00:07.730 cps - exit[Pipeline] echo

      00:00:08.052 call non-cps[Pipeline] echo

      00:00:08.640 non_cps - enter[Pipeline] sh

      00:00:09.007 [workspace@2] Running shell script*

      00:00:09.263* + ls[Pipeline] echo


      the non_cpx exit print is missing here!

       

      00:00:09.782 exit pipeline

          [JENKINS-52846] noncps function is silently aborted

          Manuel Traut created issue -
          Manuel Traut made changes -
          Description Original: The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*

          steps {
           println('call cps')
           cps()
           println('call non-cps')
           non_cps()
           println('exit pipeline')
           }

          *And this is the relevant part of the build log*
          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo{color}*00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh{color}*00:00:07.032* [workspace@2] Running shell script*00:00:07.288* + ls{color:#9a9999}[Pipeline] echo{color}*00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo{color}*00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo{color}*00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh{color}*00:00:09.007* [workspace@2] Running shell script*00:00:09.263* + ls{color:#9a9999}[Pipeline] echo{color}*00:00:09.782* exit pipeline
           
          New: The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*

          steps {

          println('call cps')
          cps()
           println('call non-cps')
           non_cps()
           println('exit pipeline')

          }

          *The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:*

          *cps() {
            println("enter cps")
            sh "ls"
            println("exit cps")
          }

          *And this is the relevant part of the build log*

          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo
          {color}*00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh
          {color}*00:00:07.032* [workspace@2] Running shell script*
          00:00:07.288* + ls{color:#9a9999}[Pipeline] echo
          {color}*00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo
          {color}*00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo
          {color}*00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh
          {color}*00:00:09.007* [workspace@2] Running shell script*
          00:00:09.263* + ls{color:#9a9999}[Pipeline] echo
          {color:#de350b}the non_cpx exit print is missing here!{color}{color}{color:#9a9999}
          {color}*00:00:09.782* exit pipeline
          Manuel Traut made changes -
          Description Original: The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*

          steps {

          println('call cps')
          cps()
           println('call non-cps')
           non_cps()
           println('exit pipeline')

          }

          *The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:*

          *cps() {
            println("enter cps")
            sh "ls"
            println("exit cps")
          }

          *And this is the relevant part of the build log*

          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo
          {color}*00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh
          {color}*00:00:07.032* [workspace@2] Running shell script*
          00:00:07.288* + ls{color:#9a9999}[Pipeline] echo
          {color}*00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo
          {color}*00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo
          {color}*00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh
          {color}*00:00:09.007* [workspace@2] Running shell script*
          00:00:09.263* + ls{color:#9a9999}[Pipeline] echo
          {color:#de350b}the non_cpx exit print is missing here!{color}{color}{color:#9a9999}
          {color}*00:00:09.782* exit pipeline
          New: The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*

          steps

          { println('call cps') cps() println('call non-cps') non_cps() println('exit pipeline') }

          *The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:*

          *cps()

          {  
          println("enter cps")   sh "ls"   println("exit cps") }

          *And this is the relevant part of the build log*

          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo{color}*00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh{color}*00:00:07.032* [workspace@2] Running shell script*
           00:00:07.288* + ls{color:#9a9999}[Pipeline] echo{color}*00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo{color}*00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo{color}*00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh{color}*00:00:09.007* [workspace@2] Running shell script*
           00:00:09.263* + ls{color:#9a9999}[Pipeline] echo
           the non_cpx exit print is missing here!{color}*00:00:09.782* exit pipeline
          Manuel Traut made changes -
          Description Original: The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*

          steps

          { println('call cps') cps() println('call non-cps') non_cps() println('exit pipeline') }

          *The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:*

          *cps()

          {  
          println("enter cps")   sh "ls"   println("exit cps") }

          *And this is the relevant part of the build log*

          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo{color}*00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh{color}*00:00:07.032* [workspace@2] Running shell script*
           00:00:07.288* + ls{color:#9a9999}[Pipeline] echo{color}*00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo{color}*00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo{color}*00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh{color}*00:00:09.007* [workspace@2] Running shell script*
           00:00:09.263* + ls{color:#9a9999}[Pipeline] echo
           the non_cpx exit print is missing here!{color}*00:00:09.782* exit pipeline
          New: The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*

          steps

          {

          println('call cps')

          cps()

          println('call non-cps')

          non_cps()

          println('exit pipeline')

          }

          *The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:*

          *cps()

          {

            println("enter cps")

            sh "ls"

            println("exit cps")

          }

          *And this is the relevant part of the build log*

          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:07.032* [workspace@2] Running shell script*

          00:00:07.288* + ls{color:#9a9999}[Pipeline] echo{color}

          *00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:09.007* [workspace@2] Running shell script*

          00:00:09.263* + ls{color:#9a9999}[Pipeline] echo{color}

          {color:#9a9999}
           {color:#de350b}the non_cpx exit print is missing here!{color}{color}

           

          *00:00:09.782* exit pipeline
          Manuel Traut made changes -
          Description Original: The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*

          steps

          {

          println('call cps')

          cps()

          println('call non-cps')

          non_cps()

          println('exit pipeline')

          }

          *The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:*

          *cps()

          {

            println("enter cps")

            sh "ls"

            println("exit cps")

          }

          *And this is the relevant part of the build log*

          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:07.032* [workspace@2] Running shell script*

          00:00:07.288* + ls{color:#9a9999}[Pipeline] echo{color}

          *00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:09.007* [workspace@2] Running shell script*

          00:00:09.263* + ls{color:#9a9999}[Pipeline] echo{color}

          {color:#9a9999}
           {color:#de350b}the non_cpx exit print is missing here!{color}{color}

           

          *00:00:09.782* exit pipeline
          New: The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*

          steps

          {

          println('call cps')

          cps()

          println('call non-cps')

          non_cps()

          println('exit pipeline')

          }

          *The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:*

          *cps()

          {   println("enter cps")   sh "ls"   println("exit cps") }

          *And this is the relevant part of the build log*

          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:07.032* [workspace@2] Running shell script*

          00:00:07.288* + ls{color:#9a9999}[Pipeline] echo{color}

          *00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:09.007* [workspace@2] Running shell script*

          00:00:09.263* + ls{color:#9a9999}[Pipeline] echo{color}

          {color:#9a9999}
           the non_cpx exit print is missing here!{color}

           

          *00:00:09.782* exit pipeline
          Manuel Traut made changes -
          Description Original: The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*

          steps

          {

          println('call cps')

          cps()

          println('call non-cps')

          non_cps()

          println('exit pipeline')

          }

          *The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:*

          *cps()

          {   println("enter cps")   sh "ls"   println("exit cps") }

          *And this is the relevant part of the build log*

          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:07.032* [workspace@2] Running shell script*

          00:00:07.288* + ls{color:#9a9999}[Pipeline] echo{color}

          *00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:09.007* [workspace@2] Running shell script*

          00:00:09.263* + ls{color:#9a9999}[Pipeline] echo{color}

          {color:#9a9999}
           the non_cpx exit print is missing here!{color}

           

          *00:00:09.782* exit pipeline
          New: {code:java}
          // code placeholder
          {code}
          The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*

          steps

          { println('call cps') cps() println('call non-cps') non_cps() println('exit pipeline') }

          *The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:*

          *cps()

          {   println("enter cps")   sh "ls"   println("exit cps") }

          *And this is the relevant part of the build log*

          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:07.032* [workspace@2] Running shell script*

          00:00:07.288* + ls{color:#9a9999}[Pipeline] echo{color}

          *00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:09.007* [workspace@2] Running shell script*

          00:00:09.263* + ls{color:#9a9999}[Pipeline] echo{color}

          {color:#9a9999}
           the non_cpx exit print is missing here!{color}

           

          *00:00:09.782* exit pipeline
          Manuel Traut made changes -
          Description Original: {code:java}
          // code placeholder
          {code}
          The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*

          steps

          { println('call cps') cps() println('call non-cps') non_cps() println('exit pipeline') }

          *The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:*

          *cps()

          {   println("enter cps")   sh "ls"   println("exit cps") }

          *And this is the relevant part of the build log*

          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:07.032* [workspace@2] Running shell script*

          00:00:07.288* + ls{color:#9a9999}[Pipeline] echo{color}

          *00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:09.007* [workspace@2] Running shell script*

          00:00:09.263* + ls{color:#9a9999}[Pipeline] echo{color}

          {color:#9a9999}
           the non_cpx exit print is missing here!{color}

           

          *00:00:09.782* exit pipeline
          New: The function annotated with @NonCPS in the attached Jenkinsfile is not executed completely. There is no report about that. If it is not allowed to call e.g. 'sh' in a NonCPS context than i would at least expect to get an Exception. But silently not executing parts of the test-code is really bad.

          If the pipeline will be extended, that it returns some Integer value, the return value is null in the caller.

          *This is a snippet from the attached pipeline*
          {code:java}
          steps
          {
           println('call cps')
           cps() println('call non-cps')
           non_cps()
           println('exit pipeline')
          }
          {code}
           

          *The cps and non_cps functions are the same, but with different println and the non_cps is annoted with @NonCPS:*
          {code:java}
          *cps()
          {
             println("enter cps")
             sh "ls"
             println("exit cps")
          }
          {code}
          *And this is the relevant part of the build log*

          *00:00:05.956* call cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:06.621* cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:07.032* [workspace@2] Running shell script*

          00:00:07.288* + ls{color:#9a9999}[Pipeline] echo{color}

          *00:00:07.730* cps - exit{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.052* call non-cps{color:#9a9999}[Pipeline] echo{color}

          *00:00:08.640* non_cps - enter{color:#9a9999}[Pipeline] sh{color}

          *00:00:09.007* [workspace@2] Running shell script*

          00:00:09.263* + ls{color:#9a9999}[Pipeline] echo{color}

          {color:#9a9999}
           the non_cpx exit print is missing here!{color}

           

          *00:00:09.782* exit pipeline
          Andrew Bayer made changes -
          Labels Original: robustness New: complex-cps-code robustness triaged-2018-11

            Unassigned Unassigned
            manut Manuel Traut
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: