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

Disable CPS transform when build is not resumable anyway

XMLWordPrintable

      If you have set WorkflowJob.resumeBlocked to true, there is no benefit to using the groovy-cps library, so there is no reason to pay its costs: overhead compiling, overhead running, poor fidelity of Groovy constructs, etc. In fact if you were running without the sandbox (as you normally would in jenkinsfile-runner), you may as well run stock Groovy.

      This is not as simple as just turning off the CPS transformer, though: various stuff in workflow-cps expects to be interacting with continuations, so there would need to be some sort of stub layer, parallel would need to be modified to use native Thread's, etc. It might be easier to just creating a fresh kind of FlowDefinition in a separate plugin, though there is likely a lot of stuff currently in workflow-cps which really ought to have been done in workflow-support.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            7 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: