You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/07 17:25:53 UTC
[GitHub] [airflow] Bowrna commented on pull request #22811: AIP-47 es new system tests
Bowrna commented on PR #22811:
URL: https://github.com/apache/airflow/pull/22811#issuecomment-1092007009
I get the following error when I run the test using pytest in breeze environment for Elasticsearch. Could you share your insights on where I am going wrong? I have configured to run the ES in local env and updated the username and password for `elasticsearch_default` conn_id
@potiuk
```
root@20f758b954e9:/opt/airflow/tests/system/providers/elasticsearch# pytest --system elasticsearch example_elasticsearch_query.py
============================= test session starts ==============================
platform linux -- Python 3.7.13, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /usr/local/bin/python
cachedir: .pytest_cache
rootdir: /opt/airflow, configfile: pytest.ini
plugins: timeouts-1.2.1, httpx-0.20.0, asyncio-0.18.3, instafail-0.4.2, anyio-3.5.0, requests-mock-1.9.3, cov-3.0.0, flaky-3.7.0, rerunfailures-9.1.1, forked-1.4.0, xdist-2.5.0
asyncio: mode=strict
setup timeout: 0.0s, execution timeout: 0.0s, teardown timeout: 0.0s
collecting ... collected 1 item
example_elasticsearch_query.py::test_run <- tests/system/utils/__init__.py FAILED [100%]
=================================== FAILURES ===================================
___________________________________ test_run ___________________________________
ValueError: None is not a valid DagRunState
During handling of the above exception, another exception occurred:
def test_run():
> dag.clear(dag_run_state=State.NONE)
../../utils/__init__.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../../airflow/utils/session.py:71: in wrapper
return func(*args, session=session, **kwargs)
../../../../airflow/models/dag.py:1856: in clear
dag_run_state=dag_run_state,
../../../../airflow/models/taskinstance.py:289: in clear_task_instances
dag_run_state = DagRunState(dag_run_state) # Validate the state value.
/usr/local/lib/python3.7/enum.py:315: in __call__
return cls.__new__(cls, value)
/usr/local/lib/python3.7/enum.py:569: in __new__
raise exc
/usr/local/lib/python3.7/enum.py:553: in __new__
result = cls._missing_(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <enum 'DagRunState'>, value = None
@classmethod
def _missing_(cls, value):
> raise ValueError("%r is not a valid %s" % (value, cls.__name__))
E ValueError: None is not a valid DagRunState
/usr/local/lib/python3.7/enum.py:582: ValueError
---------------------------- Captured stdout setup -----------------------------
========================= AIRFLOW ==========================
Home of the user: /root
Airflow home /root/airflow
Skipping initializing of the DB as it was initialized already.
You can re-initialize the database by adding --with-db-init flag when running tests.
=============================== warnings summary ===============================
../../../../airflow/configuration.py:398
/opt/airflow/airflow/configuration.py:398: FutureWarning: The 'dag_default_view' setting in [webserver] has the old default value of 'tree'. This value has been changed to 'grid' in the running config, but please update your config before Apache Airflow 3.0.
FutureWarning,
../../../../airflow/configuration.py:398
/opt/airflow/airflow/configuration.py:398: FutureWarning: The 'log_filename_template' setting in [logging] has the old default value of '{{ ti.dag_id }}/{{ ti.task_id }}/{{ ts }}/{{ try_number }}.log'. This value has been changed to 'dag_id={{ ti.dag_id }}/run_id={{ ti.run_id }}/task_id={{ ti.task_id }}/{%% if ti.map_index >= 0 %%}map_index={{ ti.map_index }}/{%% endif %%}attempt={{ try_number }}.log' in the running config, but please update your config before Apache Airflow 3.0.
FutureWarning,
-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED example_elasticsearch_query.py::test_run - ValueError: None is not a v...
======================== 1 failed, 2 warnings in 1.15s =========================
```
--
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