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
[AIRFLOW-2715] Pick up the region setting while launching Dataflow templates #4139
[AIRFLOW-2715] Pick up the region setting while launching Dataflow templates #4139
Conversation
Can you add this to |
Do you mean some documentation? |
Can you add test for the following scenarios?
|
This is already done in |
@janhicken Restarting Travis, can you rebase onto master? It might be that master was failing at that time. |
Codecov Report
@@ Coverage Diff @@
## master #4139 +/- ##
==========================================
- Coverage 77.66% 73.12% -4.54%
==========================================
Files 199 199
Lines 16290 17807 +1517
==========================================
+ Hits 12652 13022 +370
- Misses 3638 4785 +1147
Continue to review full report at Codecov.
|
To launch an instance of a Dataflow template in the configured region, the API service.projects().locations().teplates() instead of service.projects().templates() has to be used. Otherwise, all jobs will always be started in us-central1. In case there is no region configured, the default region `us-central1` will get picked up. To make it even worse, the polling for the job status already honors the region parameter and will search for the job in the wrong region in the current implementation. Because the job's status is not found, the corresponding Airflow task will hang.
Rebase has been done |
Rerunning the failed tests. |
* [AIRFLOW-3336] Add new TriggerRule for 0 upstream failures (apache#4182) Add new TriggerRule that triggers only if all upstream do not fail (success or skipped tasks are allowed) * [AIRFLOW-2715] Use region setting when launching Dataflow templates (apache#4139) To launch an instance of a Dataflow template in the configured region, the API service.projects().locations().teplates() instead of service.projects().templates() has to be used. Otherwise, all jobs will always be started in us-central1. In case there is no region configured, the default region `us-central1` will get picked up. To make it even worse, the polling for the job status already honors the region parameter and will search for the job in the wrong region in the current implementation. Because the job's status is not found, the corresponding Airflow task will hang.
…pache#4139) To launch an instance of a Dataflow template in the configured region, the API service.projects().locations().teplates() instead of service.projects().templates() has to be used. Otherwise, all jobs will always be started in us-central1. In case there is no region configured, the default region `us-central1` will get picked up. To make it even worse, the polling for the job status already honors the region parameter and will search for the job in the wrong region in the current implementation. Because the job's status is not found, the corresponding Airflow task will hang.
…pache#4139) To launch an instance of a Dataflow template in the configured region, the API service.projects().locations().teplates() instead of service.projects().templates() has to be used. Otherwise, all jobs will always be started in us-central1. In case there is no region configured, the default region `us-central1` will get picked up. To make it even worse, the polling for the job status already honors the region parameter and will search for the job in the wrong region in the current implementation. Because the job's status is not found, the corresponding Airflow task will hang.
…pache#4139) To launch an instance of a Dataflow template in the configured region, the API service.projects().locations().teplates() instead of service.projects().templates() has to be used. Otherwise, all jobs will always be started in us-central1. In case there is no region configured, the default region `us-central1` will get picked up. To make it even worse, the polling for the job status already honors the region parameter and will search for the job in the wrong region in the current implementation. Because the job's status is not found, the corresponding Airflow task will hang.
…pache#4139) To launch an instance of a Dataflow template in the configured region, the API service.projects().locations().teplates() instead of service.projects().templates() has to be used. Otherwise, all jobs will always be started in us-central1. In case there is no region configured, the default region `us-central1` will get picked up. To make it even worse, the polling for the job status already honors the region parameter and will search for the job in the wrong region in the current implementation. Because the job's status is not found, the corresponding Airflow task will hang.
…pache#4139) To launch an instance of a Dataflow template in the configured region, the API service.projects().locations().teplates() instead of service.projects().templates() has to be used. Otherwise, all jobs will always be started in us-central1. In case there is no region configured, the default region `us-central1` will get picked up. To make it even worse, the polling for the job status already honors the region parameter and will search for the job in the wrong region in the current implementation. Because the job's status is not found, the corresponding Airflow task will hang.
Make sure you have checked all steps below.
Jira
Description
To launch an instance of a Dataflow template in the configured region,
the API service.projects().locations().teplates() instead of
service.projects().templates() has to be used. Otherwise, all jobs will
always be started in us-central1.
In case there is no region configured, the default region
us-central1
will get picked up.To make it even worse, the polling for the job status already honors the
region parameter and will search for the job in the wrong region in the
current implementation. Because the job's status is not found, the
corresponding Airflow task will hang.
This PR is a second approach and follow-up of #4125
Tests
tests.contrib.hooks.test_gcp_dataflow_hook.DataFlowTemplateHookTest
has been modifiedCommits
Documentation
Code Quality
flake8