Logs missing for scheduled task execution - kubectl - 2.5.0
Description: Tasks that are launch manually via the UI show logs on the Task Execution Details page, but the same task launched via the scheduler do not.
Issue was happened before, but it closed because it was fixed on 2.3 version https://github.com/spring-cloud/spring-cloud-dataflow/issues/3678
Release versions: 2.5.0
Steps to reproduce: Deploy SCDF to kubernetes using docker kubectl Create task Launch manually, see execution logs Schedule task, no execution logs
Screenshots:
manual execution with log

scheduled execution without log
Hello @gry77 .
This is a known issue with SCDF. When SCDF launches a task it records an external execution id of the task that was launched. Thus when a user requests execution detail as you show above, it can use the external execution id to retrieve the logs. However, when a task is launched by a platform scheduler (K8s CronJob or CF PCF-Scheduler), this execution occurs outside of SCDF and thus SCDF was not involved in the launching of the task and thus does not record the external-execution-id. Without the external-execution-id SCDF can not retrieve the log.
Why was it fixed in 2.3.0 and now does not work? In 2.3.x we introduced the Scheduler Task Launcher, to be the proxy for launching tasks from a platform scheduler. This proxy would launch and in turn send a request to SCDF to launch the task. Thus SCDF was able to record the external-execution-id and thus could use that external-execution-id to retreive the log. But due to user demand we removed the use of Scheduled-Task-Launcher as a proxy for launching tasks and now allow the platform scheduler to launch the tasks directly.
We have an open issue on documenting this information here: https://github.com/spring-cloud/spring-cloud-dataflow/issues/3978
ok, thanks a lot @cppwfs
The external execution id is not assigned only if you are executing a single task, not a Composed Task. In Composed tasks, the Composed Task Runner executes every single job manually, hence it works as expected. My question is: can you somehow create a Composed Task composed of only one single task ? Or is there any other way how to make it work ?