asaf400 opened a new pull request #19027: URL: https://github.com/apache/airflow/pull/19027
closes: #18874 This PR is an attempt at fixing DockerOperator xcoms behavior, The fix is keeping the existing attach to docker's log stream for 'live' airflow logging for long-running docker containers with progress output, but asking for docker logs after the container exited for xcoms usage (either last line, or all lines), thus restoring the behavior documented here: https://airflow.apache.org/docs/apache-airflow-providers-docker/stable/_api/airflow/providers/docker/operators/docker/index.html#airflow.providers.docker.operators.docker.DockerOperator > xcom_all (bool) -- Push all the stdout or just the last line. The default is False (last line). Please note, I do not know how Mocks works in the testing files, and so, I don't think I can do much about tests for this PR, the current tests for this functionality exist and are currently (before this PR) passing, even though they shouldn't, as described in #18874 the Tests are located here: https://github.com/apache/airflow/blob/80b5e65a6abf0a136c5690548c5039f90dda01ab/tests/providers/docker/operators/test_docker.py#L455-L465 so in summary, the current tests have been useless for discovering this issue, and I personally don't know enough about airflow pytest/unittest setup to propose a change to make them better, any help or additional commit into this PR is Welcome -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
