JENKINS-37324 provided some of the infrastructure for displaying useful summaries of steps in visualizations like Blue Ocean, but mainly focused on sh steps and the like, and stopped short of providing useful summaries for some other commonly used steps. For example, you will still see General SCM or General Build Step, which are not helpful.

      Problems include:

      • Blue Ocean apparently does not check StepDescriptor.isMetaStep so as to display, for example, Fingerprinter.DescriptorImpl.displayName Record fingerprints of files to track usage in place of CoreStep.DescriptorImpl.displayName General Build Step when given fingerprint '*.jar'. Compare Snippetizer.QuasiDescriptor.
      • CoreStep, CoreWrapperStep, and GenericSCMStep should override argumentsToString to pass their delegate. (Originally automatic handling of metasteps was planned, but then dropped. Anyway pending JENKINS-37227 this would not yet work for GenericSCMStep.)
      • The default argumentsToString only handles steps passed a single argument, so even after handling metastep delegation, a call like archiveArtifacts artifacts: 'x.txt', fingerprint: true would not be described. It would be more sensible to check DescribableModel.getSoleRequiredParameter. Thus that step would be described as x.txt as a user would probably expect given a quasi-step description of Archive the artifacts.
      • Some build steps like JavadocArchiver still lack a @Symbol and @DataBoundSetter hygiene, but these are solvable on a case-by-case basis in plugins.

          [JENKINS-45101] Display meaningful summaries for metasteps

          Jesse Glick created issue -
          Jesse Glick made changes -
          Summary Original: Display meaningful summaries for compound steps New: Display meaningful summaries for metasteps
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-37324 [ JENKINS-37324 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-37227 [ JENKINS-37227 ]

          Jesse Glick added a comment -

          Fixing the default argumentsToString to consider soleRequiredParameter of the model for the Step would probably make sense, even if that implementation needs to be copied in metastep overrides, since pwd tmp: true nonsensically returns true whereas it should return null like pwd() would. Similarly for sh script: 'git rev-parse HEAD', returnStdout: true. Then again, perhaps every step just needs to override this implementation and the default is more or less useless; certainly for writeFile we know we want to return the file parameter but this could not be inferred mechanically.

          Jesse Glick added a comment - Fixing the default argumentsToString to consider soleRequiredParameter of the model for the Step would probably make sense, even if that implementation needs to be copied in metastep overrides, since pwd tmp: true nonsensically returns true whereas it should return null like pwd() would. Similarly for sh script: 'git rev-parse HEAD', returnStdout: true . Then again, perhaps every step just needs to override this implementation and the default is more or less useless; certainly for writeFile we know we want to return the file parameter but this could not be inferred mechanically.
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-45109 [ JENKINS-45109 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "workflow-cps PR 149 (Web Link)" [ 17175 ]
          Jesse Glick made changes -
          Component/s New: workflow-cps-plugin [ 21713 ]
          Component/s Original: blueocean-plugin [ 21481 ]
          Jesse Glick made changes -
          Assignee New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: