[JIRA] (JENKINS-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Devin Nusbaum updated an issue Jenkins / JENKINS-41854 Contextualize a fresh FilePath after an agent reconnection Change By: Devin Nusbaum Released As: workflow-durable-task-step 2.31, workflow-basic-steps 2. 17 18 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.178702.1486577362000.21422.1559682243328%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Devin Nusbaum edited a comment on JENKINS-41854 Re: Contextualize a fresh FilePath after an agent reconnection Fixes for this issue have just been released in Pipeline Nodes and Processes Plugin version 2.31 and Pipeline Basic Steps Plugin version 2. 17 18 . You *must* update Pipeline Groovy Plugin to version 2.70 at the same time you update the other plugins. 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.178702.1486577362000.21424.1559682243402%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Basil Crow commented on JENKINS-41854 Re: Contextualize a fresh FilePath after an agent reconnection Well done! Thank you for fixing this long-standing robustness issue. This is much appreciated! 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.178702.1486577362000.20387.1559622480208%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Jesse Glick commented on JENKINS-41854 Re: Contextualize a fresh FilePath after an agent reconnection (Or you may update Pipeline: Groovy first, and then the other plugins later.) 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.178702.1486577362000.20276.1559605500321%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Devin Nusbaum updated JENKINS-41854 Fixes for this issue have just been released in Pipeline Nodes and Processes Plugin version 2.31 and Pipeline Basic Steps Plugin version 2.17. You must update Pipeline Groovy Plugin to version 2.70 at the same time you update the other plugins. Jenkins / JENKINS-41854 Contextualize a fresh FilePath after an agent reconnection Change By: Devin Nusbaum Status: In Review Resolved Resolution: Fixed Released As: workflow-durable-task-step 2.31, workflow-basic-steps 2.17 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
[JIRA] (JENKINS-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Jesse Glick updated JENKINS-41854 Jenkins / JENKINS-41854 Contextualize a fresh FilePath after an agent reconnection Change By: Jesse Glick Status: In Progress Review 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-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Jesse Glick assigned an issue to Jesse Glick Jenkins / JENKINS-41854 Contextualize a fresh FilePath after an agent reconnection Change By: Jesse Glick Assignee: Jesse Glick 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-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Jesse Glick started work on JENKINS-41854 Change By: Jesse Glick Status: Open In Progress 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-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Vivek Pandey updated an issue Jenkins / JENKINS-41854 Contextualize a fresh FilePath after an agent reconnection Change By: Vivek Pandey Labels: robustness triaged-2018-11 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-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Basil Crow commented on JENKINS-41854 Re: Contextualize a fresh FilePath after an agent reconnection > If the issue indeed exists in the described form The issue does indeed exist in the described form, as my production experience shows (described in JENKINS-50504, which I have now marked as a duplicate of this bug). I can also confirm that restarting Jenkins fixes the problem as described above by reconstructing the FilePath from a FilePathPickle. However, between the time that I hit this bug and the time I restart Jenkins, in-use workspaces are handed out to new runs, causing both runs to fail. This is a huge inconvenience for my users. I have written a reproducible test case. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Jesse Glick commented on JENKINS-41854 Re: Contextualize a fresh FilePath after an agent reconnection If the issue indeed exists in the described form, I would not expect there to be any general workaround. The build would just fail. Possibly you could retry the second sh. You could consolidate the scripts, if there were no crucial intervening steps of other kinds. You could run each sh in its own node, using stash and unstash as needed. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Basil Crow commented on JENKINS-41854 Re: Contextualize a fresh FilePath after an agent reconnection Is there any workaround for this issue? Is there any way for me to run my scripted pipeline on a node without using the problematic PlaceholderExecutable? Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Jesse Glick commented on JENKINS-41854 Re: Contextualize a fresh FilePath after an agent reconnection Oleg Nenashev reminds me that fixing this would probably involve also acquiring a fresh WorkspaceList lock, after a new Computer becomes available and hence a new WorkspaceList. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-41854) Contextualize a fresh FilePath after an agent reconnection
Title: Message Title Jesse Glick created an issue Jenkins / JENKINS-41854 Contextualize a fresh FilePath after an agent reconnection Issue Type: Bug Assignee: Unassigned Components: workflow-durable-task-step-plugin Created: 2017/Feb/08 6:09 PM Labels: robustness Priority: Major Reporter: Jesse Glick PlaceholderExecutable does not bother listening for a closed connection as such, it just lets any nested step actually using the agent fail if the connection dies in the middle. Usually this is fine, but there is a corner case where it is probably wrong (unconfirmed): if an agent is disconnected and reconnected during the first sh in node { sh 'sleep 999' sh 'sleep 999' } then the second sh could fail since it would be using the old Channel, even when the first sh succeeds because the DurableTaskStep.Execution recomputes the FilePath after the ChannelClosedException. (But if Jenkins restarted during the first sh after the reconnection then it should work, since the FilePath would be reconstructed from a FilePathPickle.) The fix may be tricky since FilePath.channel is effectively final, so currently whatever workspace is passed from PlaceholderExecutable will be used for the duration of the block. Perhaps BodyInvoker.withContexts should support offering a Provider of contextual objects—in this case something that caches a FilePath so long as it is valid (!Channel.outClosed?), and otherwise falls back to FilePathUtils.find like FilePathPickle.