Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid chicken-egg situation with ES Provider and Airflow 2.1.1 #16488

Closed
wants to merge 1 commit into from

Conversation

kaxil
Copy link
Member

@kaxil kaxil commented Jun 16, 2021

This PR avoids chicken-egg situation; if Airflow 2.1.1 is released first
it will fail when using ES logging with following error:

Unable to load the config, contains a configuration error.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/logging/config.py", line 563, in configure
    handler = self.configure_handler(handlers[name])
  File "/usr/local/lib/python3.7/logging/config.py", line 736, in configure_handler
    result = factory(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'host_field'

This is because this will be added in soon to be released ES provider 2.0.1.

So apache-airflow[elasticsearch]==2.1.1 needs 'apache-airflow-providers-elasticsearch>=2.0.1'

We can avoid the need for this if we release the provider earlier. In which case we can close
this PR.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

This PR avoids chicken-egg situation; if Airflow 2.1.1 is released first
it will fail when using ES logging with following error:

```
Unable to load the config, contains a configuration error.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/logging/config.py", line 563, in configure
    handler = self.configure_handler(handlers[name])
  File "/usr/local/lib/python3.7/logging/config.py", line 736, in configure_handler
    result = factory(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'host_field'
```

This is because this will be added in soon to be released ES provider 2.0.1.

So `apache-airflow[elasticsearch]==2.1.1` needs `'apache-airflow-providers-elasticsearch>=2.0.1'`

We can avoid the need for this if we release the provider earlier. In which case we can close
this PR.
@uranusjr
Copy link
Member

Can we not detect the provider’s version? Using inspect like this makes me a bit worried since it tends to cause problems in the long term.

@kaxil
Copy link
Member Author

kaxil commented Jun 16, 2021

We don't need this PR anymore, ES Provider is ready to be released as soon as we merge: #16489

@kaxil kaxil closed this Jun 16, 2021
@kaxil kaxil deleted the avoid-es branch June 16, 2021 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants