Skip to content

Commit

Permalink
fix(ingestion/airflow-plugin): replace deprecated calls (#10238)
Browse files Browse the repository at this point in the history
  • Loading branch information
ms32035 authored Apr 10, 2024
1 parent 995af4e commit 47bf1f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def generate_datajob(
if config and config.datajob_url_link == DatajobUrl.GRID:
datajob.url = f"{base_url}/dags/{datajob.flow_urn.get_flow_id()}/grid?task_id={task.task_id}"
else:
datajob.url = f"{base_url}/taskinstance/list/?flt1_dag_id_equals={datajob.flow_urn.get_flow_id()}&_flt_3_task_id={task.task_id}"
datajob.url = f"{base_url}/taskinstance/list/?flt1_dag_id_equals={datajob.flow_urn.flow_id}&_flt_3_task_id={task.task_id}"

if capture_owner and dag.owner:
datajob.owners.add(dag.owner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ class DataJob:

def __post_init__(self):
job_flow_urn = DataFlowUrn.create_from_ids(
env=self.flow_urn.get_env(),
orchestrator=self.flow_urn.get_orchestrator_name(),
flow_id=self.flow_urn.get_flow_id(),
env=self.flow_urn.cluster,
orchestrator=self.flow_urn.orchestrator,
flow_id=self.flow_urn.flow_id,
)
self.urn = DataJobUrn.create_from_ids(
data_flow_urn=str(job_flow_urn), job_id=self.id
Expand All @@ -87,7 +87,7 @@ def generate_ownership_aspect(self) -> Iterable[OwnershipClass]:
],
lastModified=AuditStampClass(
time=0,
actor=builder.make_user_urn(self.flow_urn.get_orchestrator_name()),
actor=builder.make_user_urn(self.flow_urn.orchestrator),
),
)
return [ownership]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ def from_datajob(
:return: DataProcessInstance
"""
dpi: DataProcessInstance = DataProcessInstance(
orchestrator=datajob.flow_urn.get_orchestrator_name(),
cluster=datajob.flow_urn.get_env(),
orchestrator=datajob.flow_urn.orchestrator,
cluster=datajob.flow_urn.cluster,
template_urn=datajob.urn,
id=id,
)
Expand Down

0 comments on commit 47bf1f9

Please sign in to comment.