• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-cps-plugin
    • None

      Discussion

      Currently thread dumps show WorkflowScript.groovy even when you are using Jenkinsfile (or some other CpsScmScriptDefinition filename), and Script1 etc. even when you used load to load a named file. This makes the thread dump confusing for a user, since the line numbers are correct but the filenames are meaningless.

          [JENKINS-31838] Virtual thread dump uses phony filenames

          Code changed in jenkins
          User: Jesse Glick
          Path:
          cps/src/main/java/org/jenkinsci/plugins/workflow/cps/rerun/RerunAction.java
          http://jenkins-ci.org/commit/workflow-plugin/0b1b639e1b14feb1d488e18814487af33be2aec0
          Log:
          Noting JENKINS-31838.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: cps/src/main/java/org/jenkinsci/plugins/workflow/cps/rerun/RerunAction.java http://jenkins-ci.org/commit/workflow-plugin/0b1b639e1b14feb1d488e18814487af33be2aec0 Log: Noting JENKINS-31838 .

          Jesse Glick added a comment -

          Even more desirable for JENKINS-32727: we would like to refer to Jenkinsfile and servers.groovy, not Main script and Script1.

          Jesse Glick added a comment - Even more desirable for JENKINS-32727 : we would like to refer to Jenkinsfile and servers.groovy , not Main script and Script1 .

          Code changed in jenkins
          User: Jesse Glick
          Path:
          cps/src/main/java/org/jenkinsci/plugins/workflow/cps/rerun/RerunAction.java
          http://jenkins-ci.org/commit/workflow-cps-plugin/5cb03cabae608e761c6dd9f97cea29ae69b51427
          Log:
          Noting JENKINS-31838.
          Originally-Committed-As: 0b1b639e1b14feb1d488e18814487af33be2aec0

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: cps/src/main/java/org/jenkinsci/plugins/workflow/cps/rerun/RerunAction.java http://jenkins-ci.org/commit/workflow-cps-plugin/5cb03cabae608e761c6dd9f97cea29ae69b51427 Log: Noting JENKINS-31838 . Originally-Committed-As: 0b1b639e1b14feb1d488e18814487af33be2aec0

          Andrew Bayer added a comment -

          So legit questions about how much of this we actually would want to implement - Declarative has been making assumptions about Jenkinsfile coming up as WorkflowScript. That'll change as of 1.2, but any earlier version of Declarative has that hardcoded. So changing this could have ramifications.

          That said, handling Script1 for load may make more sense. I don't think anything's depending on that naming.

          Andrew Bayer added a comment - So legit questions about how much of this we actually would want to implement - Declarative has been making assumptions about Jenkinsfile coming up as WorkflowScript . That'll change as of 1.2, but any earlier version of Declarative has that hardcoded. So changing this could have ramifications. That said, handling Script1 for load may make more sense. I don't think anything's depending on that naming.

          Jesse Glick added a comment -

          As per JENKINS-57085, any file name chosen must be without path.

          Jesse Glick added a comment - As per JENKINS-57085 , any file name chosen must be without path.

          Devin Nusbaum added a comment -

          Noting that there are some cases where when someone extends CpsScript you can end up with a stack trace like the following:

          at MyScript.<clinit>(WorkflowScript:3)
          

          See this comment thread for context.

          Devin Nusbaum added a comment - Noting that there are some cases where when someone extends CpsScript  you can end up with a stack trace like the following: at MyScript.<clinit>(WorkflowScript:3) See this comment thread for context.

            kohsuke Kohsuke Kawaguchi
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: