Run a step failure message misleading when incorrect folder specified

Hi,

I received the following failure when executing a runbook with a “Run a Script” step:

08:46:38   Info     |       Extracting package 'C:\Octopus\Packages\Spaces-1\feeds-builtin\Cbh.Sales.Features\Cbh.Sales.Features.21.22.16194.0.nupkg' to 'C:\Octopus\Work\20210729004637-144638-1600'
08:46:39   Warning  |       No files were found that match the substitution target pattern 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\DisableNominateAfterContracting.ps1'
08:46:39   Verbose  |       Executing 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\DisableNominateAfterContracting.ps1'
08:46:39   Verbose  |       Retry #1 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:46:40   Verbose  |       Retry #2 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:46:40   Verbose  |       Retry #3 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:46:40   Verbose  |       Retry #4 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:46:50   Verbose  |       Retry #54 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:47:00   Verbose  |       Retry #104 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:47:10   Verbose  |       Retry #154 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:47:20   Verbose  |       Retry #204 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:47:30   Verbose  |       Retry #254 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:47:39   Error    |       System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.

It turns out that the folder containing the script to execute (FeatureToggleScripts in this example) was wrong (and hence didn’t exist).

It would be better if we got a FileNotFoundException on the script specified to make it more clear?

Version info here:

08:46:37   Verbose  |       Octopus Server version: 2020.5.4+Branch.tags-2020.5.4.Sha.257d21682c55636942d2a93bb43ff0e8f7095a49
08:46:37   Verbose  |       Using Calamari.netfx 15.1.6

Thanks,

Ant.

Hi Ant,

Thanks for getting in touch! We appreciate your idea on how we can work towards improving Octopus! I’ve raised this suggestion internally to spark a conversation on potentially improving the error message in this case to help with troubleshooting. I’ll let you know if we decide to treat this as an enhancement and raise a report. Please don’t hesitate to keep in touch if you have any further questions or concerns in the meantime. :slight_smile:

Best regards,

Kenny

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.