You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/03/23 01:09:06 UTC

[GitHub] [airflow] mik-laj opened a new pull request #7812: Imrrove support for latest API in MLEngineStartTrainingJobOperator

mik-laj opened a new pull request #7812: Imrrove support for latest API in  MLEngineStartTrainingJobOperator
URL: https://github.com/apache/airflow/pull/7812
 
 
   ---
   Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   Make sure to mark the boxes below before creating PR: [x]
   
   - [X] Description above provides context of the change
   - [X] Unit tests coverage for changes (not needed for documentation changes)
   - [X] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [X] Relevant documentation is updated including usage instructions.
   - [X] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] potiuk merged pull request #7812: Improve support for latest API in MLEngineStartTrainingJobOperator

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #7812: Improve support for latest API in  MLEngineStartTrainingJobOperator
URL: https://github.com/apache/airflow/pull/7812
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] codecov-io edited a comment on issue #7812: Imrrove support for latest API in MLEngineStartTrainingJobOperator

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7812: Imrrove support for latest API in  MLEngineStartTrainingJobOperator
URL: https://github.com/apache/airflow/pull/7812#issuecomment-602327618
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=h1) Report
   > Merging [#7812](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/d372f230fbb19724e5cbaa3b429c589464ee6da9&el=desc) will **decrease** coverage by `0.32%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7812/graphs/tree.svg?width=650&height=150&src=pr&token=WdLKlKHOAU)](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7812      +/-   ##
   ==========================================
   - Coverage   86.91%   86.59%   -0.33%     
   ==========================================
     Files         925      925              
     Lines       44873    44879       +6     
   ==========================================
   - Hits        39003    38862     -141     
   - Misses       5870     6017     +147     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...rflow/providers/google/cloud/operators/mlengine.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL29wZXJhdG9ycy9tbGVuZ2luZS5weQ==) | `88.47% <0.00%> (-1.69%)` | :arrow_down: |
   | [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0.00%> (-55.56%)` | :arrow_down: |
   | [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0.00%> (-47.06%)` | :arrow_down: |
   | [airflow/security/kerberos.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9zZWN1cml0eS9rZXJiZXJvcy5weQ==) | `30.43% <0.00%> (-45.66%)` | :arrow_down: |
   | [airflow/kubernetes/pod\_launcher.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `47.18% <0.00%> (-45.08%)` | :arrow_down: |
   | [...viders/cncf/kubernetes/operators/kubernetes\_pod.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvY25jZi9rdWJlcm5ldGVzL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZC5weQ==) | `69.69% <0.00%> (-25.26%)` | :arrow_down: |
   | [airflow/kubernetes/refresh\_config.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3JlZnJlc2hfY29uZmlnLnB5) | `50.98% <0.00%> (-23.53%)` | :arrow_down: |
   | [airflow/jobs/scheduler\_job.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9qb2JzL3NjaGVkdWxlcl9qb2IucHk=) | `90.73% <0.00%> (-0.15%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=footer). Last update [d372f23...1b7a796](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] codecov-io commented on issue #7812: Imrrove support for latest API in MLEngineStartTrainingJobOperator

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7812: Imrrove support for latest API in  MLEngineStartTrainingJobOperator
URL: https://github.com/apache/airflow/pull/7812#issuecomment-602327618
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=h1) Report
   > Merging [#7812](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/d372f230fbb19724e5cbaa3b429c589464ee6da9&el=desc) will **decrease** coverage by `0.32%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7812/graphs/tree.svg?width=650&height=150&src=pr&token=WdLKlKHOAU)](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7812      +/-   ##
   ==========================================
   - Coverage   86.91%   86.59%   -0.33%     
   ==========================================
     Files         925      925              
     Lines       44873    44879       +6     
   ==========================================
   - Hits        39003    38862     -141     
   - Misses       5870     6017     +147     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...rflow/providers/google/cloud/operators/mlengine.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL29wZXJhdG9ycy9tbGVuZ2luZS5weQ==) | `88.47% <0.00%> (-1.69%)` | :arrow_down: |
   | [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0.00%> (-55.56%)` | :arrow_down: |
   | [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0.00%> (-47.06%)` | :arrow_down: |
   | [airflow/security/kerberos.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9zZWN1cml0eS9rZXJiZXJvcy5weQ==) | `30.43% <0.00%> (-45.66%)` | :arrow_down: |
   | [airflow/kubernetes/pod\_launcher.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `47.18% <0.00%> (-45.08%)` | :arrow_down: |
   | [...viders/cncf/kubernetes/operators/kubernetes\_pod.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvY25jZi9rdWJlcm5ldGVzL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZC5weQ==) | `69.69% <0.00%> (-25.26%)` | :arrow_down: |
   | [airflow/kubernetes/refresh\_config.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3JlZnJlc2hfY29uZmlnLnB5) | `50.98% <0.00%> (-23.53%)` | :arrow_down: |
   | [airflow/jobs/scheduler\_job.py](https://codecov.io/gh/apache/airflow/pull/7812/diff?src=pr&el=tree#diff-YWlyZmxvdy9qb2JzL3NjaGVkdWxlcl9qb2IucHk=) | `90.73% <0.00%> (-0.15%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=footer). Last update [d372f23...1b7a796](https://codecov.io/gh/apache/airflow/pull/7812?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj commented on a change in pull request #7812: Imrrove support for latest API in MLEngineStartTrainingJobOperator

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7812: Imrrove support for latest API in  MLEngineStartTrainingJobOperator
URL: https://github.com/apache/airflow/pull/7812#discussion_r396173081
 
 

 ##########
 File path: airflow/providers/google/cloud/operators/mlengine.py
 ##########
 @@ -1027,8 +1027,16 @@ def execute(self, context):
         # Helper method to check if the existing job's training input is the
         # same as the request we get here.
         def check_existing_job(existing_job):
-            return existing_job.get('trainingInput', None) == \
-                training_request['trainingInput']
+            existing_training_input = existing_job.get('trainingInput', None)
+            requested_training_input = training_request['trainingInput']
+            if 'scaleTier' not in existing_training_input:
+                existing_training_input['scaleTier'] = None
 
 Review comment:
   This is a change in the remote API, so it cannot be detected by unit testing.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj commented on a change in pull request #7812: Imrrove support for latest API in MLEngineStartTrainingJobOperator

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7812: Imrrove support for latest API in  MLEngineStartTrainingJobOperator
URL: https://github.com/apache/airflow/pull/7812#discussion_r396172934
 
 

 ##########
 File path: airflow/providers/google/cloud/operators/mlengine.py
 ##########
 @@ -1027,8 +1027,16 @@ def execute(self, context):
         # Helper method to check if the existing job's training input is the
         # same as the request we get here.
         def check_existing_job(existing_job):
-            return existing_job.get('trainingInput', None) == \
-                training_request['trainingInput']
+            existing_training_input = existing_job.get('trainingInput', None)
+            requested_training_input = training_request['trainingInput']
+            if 'scaleTier' not in existing_training_input:
+                existing_training_input['scaleTier'] = None
 
 Review comment:
   The API has stopped returning fields that are empty.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services