[AIRFLOW-1325] Use Elasticsearch as logging backend - #2380
Conversation
|
@allisonwang, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bolkedebruin, @mistercrunch and @aoen to be potential reviewers. |
7f6e554 to
4d152b4
Compare
Codecov Report
@@ Coverage Diff @@
## master #2380 +/- ##
==========================================
- Coverage 69.26% 68.83% -0.44%
==========================================
Files 146 150 +4
Lines 11231 11354 +123
==========================================
+ Hits 7779 7815 +36
- Misses 3452 3539 +87
Continue to review full report at Codecov.
|
d299b5f to
e669621
Compare
cbf2fbf to
012538a
Compare
There was a problem hiding this comment.
better to check is not None
There was a problem hiding this comment.
we want logging backend url to be neither None nor empty in this case.
There was a problem hiding this comment.
There's probably a better way than sleeping
| @@ -0,0 +1,70 @@ | |||
| {# | |||
There was a problem hiding this comment.
Note: this file is WIP and will be slightly changed in the future.
|
Close this PR in favor of #2469. |
Dear Airflow maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA
Description
Please refer to Airflow 1325 for more details.
This PR depends on #2383
This PR is made the following changes:
Frontend
get_log.Flask Endpoint
Logging Backend (Most Important)
airflow/logging_backendsfolder. The general idea here is to dynamically instantiate logging backend class based on user configurationlogging_backend_url. The current logic with S3/GCS won't be changed iflogging_backend_urlis not configured.BaseLoggingBackend: an interface exposed to query logs.ElasticsearchLoggingBackendis an implementation of this base class.imports.py: a util file to get class reference by name.logging_backend.py: it acts like cached_app except it returns a cached logging backend.Test
test_elasticsearch_logging_backend.py: A ES integration test.test_elasticsearch.sh: A script to run integration test with Elasticsearch logging backend using Docker. This is not added to Travis-CI because Elasticesarch requires > 30s to install, initialize and execute the test.test_logging_backend.py: Test getting logging backend correctly.test_imports.py: Test importing class by its full name.Tests
Commits
@aoen @amaliujia