[Feature] Even further job logging improvements #131
Labels
feature/docker
Issue related to Docker application package execution.
feature/job
Issues related to job execution, reporting and logging.
project/CRIM-DEVOPS
Project linked to the CRIM project DevOps/Weaver (https://crim-ca.atlassian.net/browse/GD-47).
project/DACCS
Related to DACCS project (https://github.com/orgs/DACCS-Climate)
triage/feature
New requested feature.
triage/investigate
Exploration tasks or issues requirering more analysis
Context
PR #80 provided some improvements for logging execution percentage of the job.
Still, when the underlying job process is running a CWL package, any logging/output is lost (especially via a docker execution) since printed lines are not added to the WPS execution log.
To solve this issue, we can add a
stdout
capture of the CWL process that will act as a hook to capture and extend the WPS log with the app's logs. With this we get as fine grained details as printed out by the app.https://www.commonwl.org/user_guide/05-stdout/index.html
Only remaining issue lies with current job monitoring using an internal WPS (see #21). Because of this, the full log is only retrieved at the end of the job execution, instead of gradually as they are being printed out.
weaver/weaver/wps_restapi/processes/processes.py
Lines 199 to 203 in d2992ab
This removes any opportunity to provide job 'progression' reporting by the app, which is very inconvenient for long running applications that provide gradual updates.
Unless using very dirty hacks, there is no way to directly pass the job uuid to the sub-process (celery task), so that logs can be appended gradually, because it itself relies on the owslib WPSExecute request sent to PyWPS Service.
Investigate
All above 'progressive' logging assume that it is possible to retrieve the log asynchronously while a docker application is running.
This needs to be investigated further as it could be not available until CWL completes the subprocess.edit: quick test using
tail -f std[err|out].log
shell call show that the file is correctly updated while the docker app is running locally. We should only need to retrieve them and append them to the job logs. This can be done directly atWpsPackage
level. For remote process we can't do more than what is provided on the status monitoring route (ie: what is already done since PR #132).Steps
Relates to DAC-535
The text was updated successfully, but these errors were encountered: