[JIRA] (JENKINS-50029) Powershell treats warnings as errors
Title: Message Title sebastian slutzky assigned an issue to Gabriel Loewen Jenkins / JENKINS-50029 Powershell treats warnings as errors Change By: sebastian slutzky Assignee: sebastian slutzky Gabriel Loewen Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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.189029.1520535534000.12240.1571669880371%40Atlassian.JIRA.
[JIRA] (JENKINS-50029) Powershell treats warnings as errors
Title: Message Title sebastian slutzky assigned an issue to sebastian slutzky Jenkins / JENKINS-50029 Powershell treats warnings as errors Change By: sebastian slutzky Assignee: Gabriel Loewen sebastian slutzky Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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.189029.1520535534000.12235.1571669820270%40Atlassian.JIRA.
[JIRA] (JENKINS-50029) Powershell treats warnings as errors
Title: Message Title Gabriel Loewen commented on JENKINS-50029 Re: Powershell treats warnings as errors Here is a reference to PowerShell preference variables: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6 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-50029) Powershell treats warnings as errors
Title: Message Title Gabriel Loewen commented on JENKINS-50029 Re: Powershell treats warnings as errors E.g. the error stream is technically ignored if your error action proference is not set to "Stop" 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-50029) Powershell treats warnings as errors
Title: Message Title Gabriel Loewen commented on JENKINS-50029 Re: Powershell treats warnings as errors Write-Error does not typically fail a PowerShell script unless you set ErrorActionPreference to "Stop" or explicitly pass -ErrorAction to the cmdlet. 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-50029) Powershell treats warnings as errors
Title: Message Title Jakub Michalec commented on JENKINS-50029 Re: Powershell treats warnings as errors Gabriel Loewen related to https://jenkins.io/blog/2017/07/26/powershell-pipeline/ - Failed step caused by a non-empty error stream, in our jobs we use: def status = powershell returnStatus: true, script: """ . .\\scripts\\someScript.ps1" """ if(status != 0) { powershell ("Write-Error \"Ooops, an error occured\"") } If anything goes wrong it should fail job and run post action, after that fix (upgrade to 1.22) job goes further. Adding explicit exit 1, should fix it from our perspective, but from my perspective write-error should stop execution 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-50029) Powershell treats warnings as errors
Title: Message Title Sam Van Oort closed an issue as Done Released with version 1.22 Jenkins / JENKINS-50029 Powershell treats warnings as errors Change By: Sam Van Oort Status: Open Closed Resolution: Done 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-50029) Powershell treats warnings as errors
Title: Message Title Wouter Slob commented on JENKINS-50029 Re: Powershell treats warnings as errors Thnx Sam Van Oort & Gabriel Loewen for prompt response and explanation. I'm looking forward to testing the upcoming patch. I'm not sure if it is related to the same plugin, but yesterday I've created another issue: JENKINS-49986. You might want to have a quick look at that one 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-50029) Powershell treats warnings as errors
Title: Message Title Gabriel Loewen commented on JENKINS-50029 Re: Powershell treats warnings as errors No, nothing else pending from me. Just trying to fix the bugs as quickly as I find them 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-50029) Powershell treats warnings as errors
Title: Message Title Sam Van Oort commented on JENKINS-50029 Re: Powershell treats warnings as errors Gabriel Loewen That's fine, I'll try to get someone who knows windows to do a review tomorrow and then once review is sold we can release. Do you have anything else pending though? I'd like to aim for one more rollup-release of Durable Task and then focus on longer-ranged enhancements for a bit. 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-50029) Powershell treats warnings as errors
Title: Message Title Gabriel Loewen assigned an issue to Gabriel Loewen Jenkins / JENKINS-50029 Powershell treats warnings as errors Change By: Gabriel Loewen Assignee: Gabriel Loewen 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-50029) Powershell treats warnings as errors
Title: Message Title Gabriel Loewen edited a comment on JENKINS-50029 Re: Powershell treats warnings as errors Actually, from the context of PowerShell it is an error. You are executing a native command and that command is producing what PowerShell is interpreting as an error, which is written to the error stream and then caught by the PowerShell pipeline step. You can test this out for yourself in a PowerShell session by executing that command and then checking the error history in $Error, which is a PowerShell automatic variable containing an array of errors. Normally this would be a non-fatal error, but because of an issue with how errors are handled in the PowerShell pipeline step it is treated as a fatal error and exiting.[~svanoort] I have submitted a PR that fixes this issue, [67| {color:#33} [ https://github.com/jenkinsci/durable-task-plugin/pull/67 ] {color} ] , so it should be fixed as soon as that PR is merged and a new version is cut :) 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-50029) Powershell treats warnings as errors
Title: Message Title Gabriel Loewen commented on JENKINS-50029 Re: Powershell treats warnings as errors Actually, from the context of PowerShell it is an error. You are executing a native command and that command is producing what PowerShell is interpreting as an error, which is written to the error stream and then caught by the PowerShell pipeline step. You can test this out for yourself in a PowerShell session by executing that command and then checking the error history in $Error, which is a PowerShell automatic variable containing an array of errors. Normally this would be a non-fatal error, but because of an issue with how errors are handled in the PowerShell pipeline step it is treated as a fatal error and exiting. Sam Van Oort I have submitted a PR that fixes this issue, [67|https://github.com/jenkinsci/durable-task-plugin/pull/67], so it should be fixed as soon as that PR is merged and a new version is cut 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-50029) Powershell treats warnings as errors
Title: Message Title Sam Van Oort commented on JENKINS-50029 Re: Powershell treats warnings as errors Gabriel Loewen Would you be able to take a look? You're the guru on the Powershell end of things here. 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-50029) Powershell treats warnings as errors
Title: Message Title Sam Van Oort assigned an issue to Unassigned Jenkins / JENKINS-50029 Powershell treats warnings as errors Change By: Sam Van Oort Assignee: Sam Van Oort 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-50029) Powershell treats warnings as errors
Title: Message Title Wouter Slob updated an issue Jenkins / JENKINS-50029 Powershell treats warnings as errors Change By: Wouter Slob After upgrading to the latest Jenkins LTS & durable task plugin (v1.21) our pipelines fail on warnings.Pipeline:{code:java}node() {bat 'C:\\Python27\\python.exe -c "import warnings;warnings.warn(\'future\', FutureWarning)"'powershell 'C:\\Python27\\python.exe -c "import warnings;warnings.warn(\'future\', FutureWarning)"'}{code}{quote}Output: 2018-03-08 19:47:13 [src] Running batch script 2018-03-08 19:47:14 2018-03-08 19:47:14 d:\src>C:\Python27\python.exe -c "import warnings;warnings.warn('future', FutureWarning)" 2018-03-08 19:47:17 -c:1: FutureWarning: future [Pipeline] powershell {color:#ff}2018-03-08 19:47:18 [src] Running PowerShell script{color} {color:#ff} 2018-03-08 19:47:20 powershell.exe : -c:1: FutureWarning: future{color} {color:#ff} 2018-03-08 19:47:20 At D:\src@tmp\durable-4343e8b5\powershellWrapper.ps1:3 char:1{color} {color:#ff} 2018-03-08 19:47:20 + & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File ...{color} {color:#ff} 2018-03-08 19:47:20 + ~{color} {color:#ff} 2018-03-08 19:47:20 + CategoryInfo : NotSpecified: (-c:1: FutureWarning: future:Strin g) [], RemoteException{color} {color:#ff} 2018-03-08 19:47:20 + FullyQualifiedErrorId : NativeCommandError{color} {color:#ff} 2018-03-08 19:47:20{color}{quote} This returns in "1" exit code, causing the pipeline to fail. So somehow, somewhere, the warning is transformed / interpreted as an error. Add Comment
[JIRA] (JENKINS-50029) Powershell treats warnings as errors
Title: Message Title Wouter Slob assigned an issue to Sam Van Oort Jenkins / JENKINS-50029 Powershell treats warnings as errors Change By: Wouter Slob Assignee: Sam Van Oort 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-50029) Powershell treats warnings as errors
Title: Message Title Wouter Slob created an issue Jenkins / JENKINS-50029 Powershell treats warnings as errors Issue Type: Bug Assignee: Unassigned Components: durable-task-plugin Created: 2018-03-08 18:58 Environment: Latest Jenkins LTS, Durable-task plugin v2.21 Priority: Major Reporter: Wouter Slob After upgrading to the latest Jenkins LTS & durable task plugin (v1.21) our pipelines fail on warnings. Pipeline: node() { bat 'C:\\Python27\\python.exe -c "import warnings;warnings.warn(\'future\', FutureWarning)"' powershell 'C:\\Python27\\python.exe -c "import warnings;warnings.warn(\'future\', FutureWarning)"' } Output: 2018-03-08 19:47:13 [src] Running batch script 2018-03-08 19:47:14 2018-03-08 19:47:14 d:\src>C:\Python27\python.exe -c "import warnings;warnings.warn('future', FutureWarning)" 2018-03-08 19:47:17 -c:1: FutureWarning: future [Pipeline] powershell 2018-03-08 19:47:18 [src] Running PowerShell script 2018-03-08 19:47:20 powershell.exe : -c:1: FutureWarning: future 2018-03-08 19:47:20 At D:\src@tmp\durable-4343e8b5\powershellWrapper.ps1:3 char:1 2018-03-08 19:47:20 + & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File ... 2018-03-08 19:47:20 + ~ 2018-03-08 19:47:20 + CategoryInfo : NotSpecified: (-c:1: FutureWarning: future:Strin g) [], Re