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

Fix bq extract arg change in upstream #1504

Merged
merged 2 commits into from
Apr 10, 2024
Merged
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
6 changes: 4 additions & 2 deletions astronomer/providers/core/sensors/filesystem.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from __future__ import annotations

import os
import warnings
from datetime import timedelta
from typing import Any, Dict, Optional
from typing import Any

from airflow.hooks.filesystem import FSHook
from airflow.sensors.filesystem import FileSensor
Expand Down Expand Up @@ -54,7 +56,7 @@ def execute(self, context: Context) -> None:
method_name="execute_complete",
)

def execute_complete(self, context: Context, event: Optional[Dict[str, Any]]) -> None:
def execute_complete(self, context: Context, event: bool | None = None) -> None:
"""
Callback for when the trigger fires - returns immediately.
Relies on trigger to throw an exception, otherwise it assumes execution was
Expand Down
2 changes: 1 addition & 1 deletion astronomer/providers/google/cloud/extractors/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def extract_on_complete(self, task_instance: TaskInstance) -> Optional[TaskMetad

stats = BigQueryDatasetsProvider(client=self._big_query_client).get_facets(bigquery_job_id)
inputs = stats.inputs
output = stats.output
output = stats.outputs
run_facets = stats.run_facets
job_facets = {}
if isinstance(
Expand Down
2 changes: 1 addition & 1 deletion tests/google/cloud/extractors/test_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_extract_on_complete(
job_id=job_id, error_result=False
)
mock_bg_dataset_provider.return_value = BigQueryFacets(
run_facets=RUN_FACETS, inputs=INPUT_STATS, output=OUTPUT_STATS
run_facets=RUN_FACETS, inputs=INPUT_STATS, outputs=OUTPUT_STATS
)

task_id = "insert_query_job"
Expand Down
Loading