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

Force airflow db reset #1551

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
# key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: poetry install --no-interaction --with sentry-sdk
run: poetry install --no-interaction --with sentry-sdk,airflow

- run: |
poetry run pytest tests/common tests/normalize tests/reflection tests/sources tests/load/test_dummy_client.py tests/extract/test_extract.py tests/extract/test_sources.py tests/pipeline/test_pipeline_state.py
Expand Down
4 changes: 3 additions & 1 deletion dlt/load/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ def spool_new_jobs(self, load_id: str, schema: Schema) -> Tuple[int, List[LoadJo
# use thread based pool as jobs processing is mostly I/O and we do not want to pickle jobs
load_files = filter_new_jobs(
self.load_storage.list_new_jobs(load_id),
self.destination.capabilities(self.destination.configuration(self.initial_client_config)),
self.destination.capabilities(
self.destination.configuration(self.initial_client_config)
),
self.config,
)
file_count = len(load_files)
Expand Down
11 changes: 11 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,14 @@ def _create_pipeline_instance_id(self) -> str:

# disable httpx request logging (too verbose when testing qdrant)
logging.getLogger("httpx").setLevel("WARNING")

# reset airflow db
from airflow.utils import db

for log in ["airflow"]:
logging.getLogger(log).setLevel("ERROR")

try:
db.resetdb()
except Exception:
pass
Loading