[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-08-21 Thread dnusb...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Devin Nusbaum resolved as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

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

  
 
 
 
 

 
 Jenkins /  JENKINS-52189  
 
 
  GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
Change By: 
 Devin Nusbaum  
 
 
Status: 
 Reopened Resolved  
 
 
Assignee: 
 Thomas Weißschuh  
 
 
Resolution: 
 Fixed  
 
 
Released As: 
 workflow-cps 2.63 , workflow-api 2.36, workflow-job 2.34  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to 

[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-08-01 Thread m.win...@sap.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Markus Winter commented on  JENKINS-52189  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
 Having the same issue with the missed FlowStartNode Any idea when the fixes will be released?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.191946.1530020805000.5396.1564664040172%40Atlassian.JIRA.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-04-25 Thread jenk...@t-8ch.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Weißschuh commented on  JENKINS-52189  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

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

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-04-24 Thread dnusb...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Devin Nusbaum assigned an issue to Unassigned  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-52189  
 
 
  GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
Change By: 
 Devin Nusbaum  
 
 
Assignee: 
 Devin Nusbaum  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-04-24 Thread dnusb...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Devin Nusbaum commented on  JENKINS-52189  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
 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.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-04-24 Thread jenk...@t-8ch.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Weißschuh assigned an issue to Devin Nusbaum  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-52189  
 
 
  GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
Change By: 
 Thomas Weißschuh  
 
 
Assignee: 
 Sam Van Oort Devin Nusbaum  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-02-13 Thread jenk...@t-8ch.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Weißschuh commented on  JENKINS-52189  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
 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?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-02-13 Thread allan.le...@youview.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Allan Lewis assigned an issue to Sam Van Oort  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Sorry, Thomas Weißschuh, I did that by mistake! I probably pressed 'i' while this ticket was focused.  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-52189  
 
 
  GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
Change By: 
 Allan Lewis  
 
 
Assignee: 
 Allan Lewis Sam Van Oort  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-02-13 Thread jenk...@t-8ch.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Weißschuh commented on  JENKINS-52189  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
 Allan Lewis you assigned this to yourself, are you planning on working on this? Otherwise I may find the time to take a shot at it.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-02-13 Thread allan.le...@youview.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Allan Lewis assigned an issue to Allan Lewis  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-52189  
 
 
  GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
Change By: 
 Allan Lewis  
 
 
Assignee: 
 Devin Nusbaum Allan Lewis  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-02-13 Thread dnusb...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Devin Nusbaum commented on  JENKINS-52189  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
 Thomas Weißschuh If you can figure out a clean way to make it work and submit a PR, then I'd be happy to review it. I don't think there is any reason why we wouldn't want it to work, just that the most obvious implementation happens to not work for that use case.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-02-13 Thread jenk...@t-8ch.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Weißschuh commented on  JENKINS-52189  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
 My current code is nicer to implement with customly created listeners. I can rewrite it to use the global one but wanted to ask before, as maybe it should actually work.  My FlowExecutionListener creates a GraphListener for every new Flow (and stores it). The following snippet works around the currently missing functionality by triggering the creation of the GraphListener "manually": 

 

import hudson.Extension;
import org.jenkinsci.plugins.workflow.flow.GraphListener;
import org.jenkinsci.plugins.workflow.graph.FlowNode;
import org.jenkinsci.plugins.workflow.graph.FlowStartNode;

/*
 * This class works around https://issues.jenkins-ci.org/browse/JENKINS-52189
 * Especially the part where GraphListeners attached during FlowExecutionListener.onRunning() do not receive the FlowStartNode.
 * As the per instance logic is nicer to reason about and may work properly in a future version of Jenkins,
 * this class will be the bridge until then.
 */
@Extension
public class WorkaroundGraphListener implements GraphListener, GraphListener.Synchronous {

@Override
public void onNewHead(FlowNode node) {
final OTFlowExecutionListener flowExecutionListener = OTFlowExecutionListener.get();
if (node instanceof FlowStartNode) {
flowExecutionListener.getListener(node.getExecution()).onNewHead(node);
}
}
}
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 

[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-02-13 Thread dnusb...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Devin Nusbaum commented on  JENKINS-52189  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
 Thomas Weißschuh I don't know. If you have a use case where you need to use FlowExecutionListener.onRunning to add a listener and cannot use a global extension, then perhaps better to file a separate bug for that specific case. Otherwise, maybe we can just update the docs for FlowExecutionListener#onRunning to mention that if you add a listener in that method it will not see FlowStartNodes.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-02-13 Thread jenk...@t-8ch.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Weißschuh edited a comment on  JENKINS-52189  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
 Another point (also raised on the PR):Should it be possible to use the instantiation based usage of GraphListener (asexplained by its javadoc?Something like the  follow  following  test:{code}   @Issue("JENKINS-52189")@Testpublic void notifyFlowStartNodeViaFlowExecutionListener() {story.then(s->{WorkflowJob j = jenkins().createProject(WorkflowJob.class, "bob");j.setDefinition(new CpsFlowDefinition("echo 'I did a thing'", true));WorkflowRun r = story.j.buildAndAssertSuccess(j);FlowStartNodeFlowExectionListener listener = jenkins().getExtensionList(FlowStartNodeFlowExectionListener.class).get(0);assertThat(listener.heads, Matchers.greaterThan(1));assertThat(listener.execNames, Matchers.contains(r.getExecution().toString()));});}@TestExtension("notifyFlowStartNodeViaFlowExecutionListener")public static class FlowStartNodeFlowExectionListener extends FlowExecutionListener {int heads = 0;final List execNames = new ArrayList<>();@Overridepublic void onRunning(@Nonnull FlowExecution execution) {execution.addListener(node -> {heads++;if (node instanceof FlowStartNode) {execNames.add(node.getExecution().toString());}});}}{code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-02-13 Thread jenk...@t-8ch.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Weißschuh reopened an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-52189  
 
 
  GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
Change By: 
 Thomas Weißschuh  
 
 
Resolution: 
 Fixed  
 
 
Status: 
 Resolved Reopened  
 
 
Assignee: 
 Sam Van Oort Devin Nusbaum  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-52189) GraphListener does not receive FlowStartNode

2019-02-01 Thread dnusb...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Devin Nusbaum resolved as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 A fix for this issue was released in version 2.63 of Pipeline Groovy Plugin.  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-52189  
 
 
  GraphListener does not receive FlowStartNode   
 

  
 
 
 
 

 
Change By: 
 Devin Nusbaum  
 
 
Status: 
 In Progress Resolved  
 
 
Resolution: 
 Fixed  
 
 
Released As: 
 workflow-cps 2.63  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.