Skip to content

Commit

Permalink
fix(ingest/dagster): Fix Dagster build (#12121)
Browse files Browse the repository at this point in the history
  • Loading branch information
treff7es authored Dec 13, 2024
1 parent d5e0513 commit ee82a88
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dagster-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
DATAHUB_TELEMETRY_ENABLED: false
strategy:
matrix:
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.10"]
include:
- python-version: "3.8"
- python-version: "3.9"
extraPythonRequirement: "dagster>=1.3.3"
- python-version: "3.10"
extraPythonRequirement: "dagster>=1.3.3"
Expand Down
2 changes: 1 addition & 1 deletion metadata-ingestion-modules/dagster-plugin/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def get_long_description():
],
# Package info.
zip_safe=False,
python_requires=">=3.8",
python_requires=">=3.9",
package_dir={"": "src"},
packages=setuptools.find_namespace_packages(where="./src"),
entry_points=entry_points,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@
from dagster._core.definitions.multi_asset_sensor_definition import (
AssetMaterializationFunctionReturn,
)
from dagster._core.definitions.sensor_definition import (
DefaultSensorStatus,
RawSensorEvaluationFunctionReturn,
)
from dagster._core.definitions.sensor_definition import DefaultSensorStatus

# This SensorReturnTypesUnion is from Dagster 1.9.1+ and is not available in older versions
# of Dagster. We need to import it conditionally to avoid breaking compatibility with older
try:
from dagster._core.definitions.sensor_definition import SensorReturnTypesUnion
except ImportError:
from dagster._core.definitions.sensor_definition import RawSensorEvaluationFunctionReturn as SensorReturnTypesUnion # type: ignore

from dagster._core.definitions.target import ExecutableDefinition
from dagster._core.definitions.unresolved_asset_job_definition import (
UnresolvedAssetJobDefinition,
Expand Down Expand Up @@ -689,9 +694,7 @@ def _emit_asset_metadata(

return SkipReason("Asset metadata processed")

def _emit_metadata(
self, context: RunStatusSensorContext
) -> RawSensorEvaluationFunctionReturn:
def _emit_metadata(self, context: RunStatusSensorContext) -> SensorReturnTypesUnion:
"""
Function to emit metadata for datahub rest.
"""
Expand Down

0 comments on commit ee82a88

Please sign in to comment.