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

GraphListener does not receive FlowStartNode

    Details

    • Similar Issues:
    • Released As:
      workflow-cps 2.63, workflow-api 2.36, workflow-job 2.34

      Description

      Classes implementing org.jenkinsci.plugins.workflow.flow.GraphListener are not informed about FlowStartNode s at execution start.

      All other types of FlowNode are handled.

      (Including the matching FlowEndNode)

        Attachments

          Activity

          Hide
          t8ch Thomas Weißschuh added a comment -

          Devin Nusbaum so the easy way would be to just fire the listeners before the execution
          This however would break the behaviour of the `FlowExecution.onRunning()` method which is documented to receive an already started listener.
          (The testsuite however passes)

          We could also introduce a new method `FlowExecution.beforeRunning()` (or `onCreated()`) that fires before the flow is actually started.

          WDYT?

          Show
          t8ch Thomas Weißschuh added a comment - Devin Nusbaum so the easy way would be to just fire the listeners before the execution This however would break the behaviour of the `FlowExecution.onRunning()` method which is documented to receive an already started listener . (The testsuite however passes) We could also introduce a new method `FlowExecution.beforeRunning()` (or `onCreated()`) that fires before the flow is actually started. WDYT?
          Hide
          dnusbaum Devin Nusbaum added a comment -

          Thomas Weißschuh I guess introducing a new method `onCreated()` seems better in case some code in the wild relies on the documented behavior. Feel free to file a PR, ideally linked to an update to some other plugin that wants to use the new method.

          Show
          dnusbaum Devin Nusbaum added a comment - Thomas Weißschuh I guess introducing a new method `onCreated()` seems better in case some code in the wild relies on the documented behavior. Feel free to file a PR, ideally linked to an update to some other plugin that wants to use the new method.
          Hide
          t8ch Thomas Weißschuh added a comment -

          Devin Nusbaum: https://github.com/jenkinsci/workflow-job-plugin/pull/129
          Unfortunately the plugin that needs it is not (yet?) public.

          Show
          t8ch Thomas Weißschuh added a comment - Devin Nusbaum : https://github.com/jenkinsci/workflow-job-plugin/pull/129 Unfortunately the plugin that needs it is not (yet?) public.
          Hide
          mawinter69 Markus Winter added a comment -

          Having the same issue with the missed FlowStartNode

          Any idea when the fixes will be released?

          Show
          mawinter69 Markus Winter added a comment - Having the same issue with the missed FlowStartNode Any idea when the fixes will be released?
          Hide
          dnusbaum Devin Nusbaum added a comment -

          The new FlowExecutionListener.onCreated method was released in Pipeline API Plugin 2.36, and is activated by Pipeline Job Plugin 2.34.

          Show
          dnusbaum Devin Nusbaum added a comment - The new FlowExecutionListener.onCreated method was released in Pipeline API Plugin 2.36, and is activated by Pipeline Job Plugin 2.34.

            People

            • Assignee:
              t8ch Thomas Weißschuh
              Reporter:
              t8ch Thomas Weißschuh
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: