turbaszek edited a comment on pull request #12704:
URL: https://github.com/apache/airflow/pull/12704#issuecomment-735413321
The only thing that I'm wondering about is suppressing / removing log
records when using json/yaml. Because otherwise the output is not valid. For
example:
```
root@e794bcc2d698:/opt/airflow# airflow dags list --output yaml | yq "."
/opt/airflow/airflow/providers/cncf/kubernetes/backcompat/backwards_compat_converters.py:26
DeprecationWarning: This module is deprecated. Please use
`kubernetes.client.models.V1Volume`.
/opt/airflow/airflow/providers/cncf/kubernetes/backcompat/backwards_compat_converters.py:27
DeprecationWarning: This module is deprecated. Please use
`kubernetes.client.models.V1VolumeMount`.
yq: Error running jq: ParserError: expected '<document start>', but found '{'
in "<stdin>", line 1, column 27.
[
"2020-11-29T15:41:59",
435
]
```
or
```
^[[Aroot@e794bcc2d698:/opt/airflow# airflow providers hooks --output yaml |
yq ".[]"
/usr/local/lib/python3.6/site-packages/snowflake/connector/options.py:39
UserWarning: You have an incompatible version of 'pyarrow' installed, please
install a version that adheres to: 'pyarrow<0.18.0,>=0.17.0; extra == "pandas"'
yq: Error running jq: ParserError: while parsing a block mapping
in "<stdin>", line 1, column 1
expected <block end>, but found '{'
in "<stdin>", line 1, column 27.
```
It can also appear inline with the output:
```
Config info
executor | LocalExecutor
task_logging_handler | airflow.utils.log.file_task_handler.FileTaskHandler
sql_alchemy_conn |
postgresql+psycopg2://postgres:airflow@postgres/airflow
dags_folder | /files/dags
plugins_folder | /root/airflow/plugins
base_log_folder | /root/airflow/logs
[2020-11-29 15:46:57,661] {providers_manager.py:207} WARNING - Exception
when importing
'airflow.providers.google.cloud.hooks.compute_ssh.ComputeEngineSSHHook' from
'apache-airflow-providers-google' package: No module named
'google.cloud.oslogin_v1'
/usr/local/lib/python3.6/site-packages/snowflake/connector/options.py:39
UserWarning: You have an incompatible version of 'pyarrow' installed, please
install a version that adheres to: 'pyarrow<0.18.0,>=0.17.0; extra == "pandas"'
Providers info
apache-airflow-providers-amazon | 1.0.0b2
apache-airflow-providers-apache-cassandra | 1.0.0b2
apache-airflow-providers-apache-druid | 1.0.0b2
```
I've never seen this in any other application, so I lean toward suppressing
warnings and logs.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]