Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.8.0
-
None
Description
Current Situation
- If the source selection returns 0 files and SourceFileOptions/Directives/DisableErrorOnNonFilesFound=true:
- If no PostProcessing commands are defined on the Target
- YADE execution ends as expected.
- If PostProcessing commands are defined on the Target
- This also includes Jump-Host setups where the Target is located in an external network and cannot be reached directly from the Source.
- In this case the YADE engine automatically generates PostProcessing commands on the Jump Host to reach the Target.
- The transfer fails with a target connection exception (e.g. "SSHClient not connected" for SFTP).
- Cause:
- YADE establishes a connection to the Jump/Target only if the source selection returns more than 0 files.
- If PostProcessing commands exist, YADE still attempts to execute them.
- As a result, the PostProcessing step is executed on a Jump/Target client that was never connected, which leads to the connection exception.
- This also includes Jump-Host setups where the Target is located in an external network and cannot be reached directly from the Source.
- If no PostProcessing commands are defined on the Target
Maintainer Note
- If configured, the following operation commands are executed on the Target only if the Source file selection returns at least one file.
- If no files are selected, the Target connection is not established and these commands are not executed.
- CommandBeforeOperation
- CommandAfterOperationOnSuccess
- CommandAfterOperationOnError
- CommandAfterOperationFinal
Patch
- A cumulative patch is available for JS7 versions 2.8.2.
- The patch includes the fixes for
YADE-637,YADE-638,YADE-639,YADE-640,YADE-642,YADE-644,YADE-645 - Download
- JS7 version 2.8.2
- js7_agent.2.8.2-PATCH.YADE-642.jar [ sha256 ] [ sig ] [ tsr ]
- Note Any previously installed patches must be removed, as all included fixes are already part of this cumulative patch.
- JS7 version 2.8.2
- Applying the patch
- Since
YADE-626, YADE can be executed not only as a standalone Shell Job, but also as an integrated Java JITL Job. - This means the patch can/should be deployed in two locations:
- <agent install>/lib/patches - for YADE configured as a JITL Job (com.sos.jitl.jobs.yade.YADEJob)
- See JS7 - Patches for Agent
- Note: The Agent instance has to be restarted to apply patch.
- <agent install>/yade/lib/patches - for YADE configured as a Shell Job
- Note: The Agent instance does not need to be restarted to apply the patch
- <agent install>/lib/patches - for YADE configured as a JITL Job (com.sos.jitl.jobs.yade.YADEJob)
- Since
Test Instructions
- Transfer without Jump Host
- Source configuration
- Configure LocalSource as Source.
- Configure the Source Selection so that no files are found (e.g., use a non-existing directory).
- Set SourceFileOptions/Directives/DisableErrorOnNonFilesFound = true
- Configure operation commands:
- LocalPreProcessing/CommandBeforeOperation = echo CommandBeforeOperation
- LocalPostProcessing/CommandAfterOperationOnSuccess = echo CommandAfterOperationOnSuccess
- LocalPostProcessing/CommandAfterOperationOnError = echo CommandAfterOperationOnError
- LocalPostProcessing/CommandAfterOperationFinal = echo CommandAfterOperationFinal
- Target configuration
- Configure an SFTPFragmentRef as Target.
- Configure the same operation commands as above.
- Execute test
- Expected result
- The corresponding commands are executed only on the Source.
- The Target remains unconnected.
- No commands configured on the Target are executed.
- No exceptions are thrown.
- Expected result
- Source configuration
- Transfer with Jump Host
- Source configuration
- Configure LocalSource as Source (same configuration as above).
- Target configuration
- Configure an SFTPFragmentRef as Target.
- Configure operation commands as above.
- The corresponding SFTPFragment must use the Jump Host.
- Configure an SFTPFragmentRef as Target.
- Execute test
- Expected result
- The corresponding commands are executed only on the Source.
- The Jump Host and Target remain unconnected.
- No commands configured on the Jump Host or Target are executed.
- No exceptions are thrown.
- Expected result
- Source configuration
- Regression Tests (to ensure the fix did not break existing functionality)
- Execute additional tests:
- Test with SourceFileOptions/Directives/DisableErrorOnNonFilesFound = false
- Test with a Source Selection that returns files.
- Execute additional tests: