You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "dstandish (via GitHub)" <gi...@apache.org> on 2023/10/05 22:18:05 UTC
[PR] Use None instead of empty data structures when no ElasticSearch logs [airflow]
dstandish opened a new pull request, #34793:
URL: https://github.com/apache/airflow/pull/34793
Depends on https://github.com/apache/airflow/pull/34790
Previously, when there were no logs, we would just use [] or {} and continue to process them through functions such as "group by host" and such. But if no logs are found, it's odd to go down those paths.
One example of the confusion is the return type in `es_read` was `list | ElasticSearchResponse`. This makes it look like it would either be a list (presumably of logs?) or an ElasticSearchResponse object (presumably also containing logs?). But in reality, the only time list was returned, was when there _were no logs at all!_ This was just to adhere to the contract that we handle "no logs" the same as "logs". _(And it turns out that ElasticSearchResponse magically also behaves like at iterable which is also confusing but that's a separate issue.)_
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Use None instead of empty data structures when no ElasticSearch logs [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #34793:
URL: https://github.com/apache/airflow/pull/34793#issuecomment-1761303968
@dstandish can you please rebase?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Use None instead of empty data structures when no ElasticSearch logs [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal merged PR #34793:
URL: https://github.com/apache/airflow/pull/34793
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org