Skip to content

Commit

Permalink
Added missing project_id to the wait_for_job (#24020)
Browse files Browse the repository at this point in the history
  • Loading branch information
Łukasz Wyszomirski authored May 30, 2022
1 parent 56fd040 commit 4a52507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions airflow/providers/apache/beam/operators/beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ def execute(self, context: 'Context'):
location=self.dataflow_config.location,
job_id=self.dataflow_job_id,
multiple_jobs=False,
project_id=self.dataflow_config.project_id,
)
return {"dataflow_job_id": self.dataflow_job_id}
else:
Expand Down Expand Up @@ -600,6 +601,7 @@ def execute(self, context: 'Context'):
location=self.dataflow_config.location,
job_id=self.dataflow_job_id,
multiple_jobs=False,
project_id=self.dataflow_config.project_id,
)
return {"dataflow_job_id": self.dataflow_job_id}
else:
Expand Down
2 changes: 2 additions & 0 deletions tests/providers/apache/beam/operators/test_beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def test_exec_dataflow_runner(self, gcs_hook, dataflow_hook_mock, beam_hook_mock
job_name=job_name,
location='us-central1',
multiple_jobs=False,
project_id=dataflow_config.project_id,
)
dataflow_hook_mock.return_value.provide_authorized_gcloud.assert_called_once_with()

Expand Down Expand Up @@ -415,6 +416,7 @@ def test_exec_dataflow_runner(self, gcs_hook, dataflow_hook_mock, beam_hook_mock
job_name=job_name,
location='us-central1',
multiple_jobs=False,
project_id=dataflow_config.project_id,
)
dataflow_hook_mock.return_value.provide_authorized_gcloud.assert_called_once_with()

Expand Down

0 comments on commit 4a52507

Please sign in to comment.