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/08/26 00:42:20 UTC

[GitHub] [airflow] ephraimbuddy opened a new pull request #10572: add info about update mask to API doc introduction

ephraimbuddy opened a new pull request #10572:
URL: https://github.com/apache/airflow/pull/10572


   This PR adds information about update_mask to the REST API reference documentation
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   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).
   


----------------------------------------------------------------
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



[GitHub] [airflow] mik-laj merged pull request #10572: add info about update mask to API doc introduction

Posted by GitBox <gi...@apache.org>.
mik-laj merged pull request #10572:
URL: https://github.com/apache/airflow/pull/10572


   


----------------------------------------------------------------
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



[GitHub] [airflow] mik-laj commented on a change in pull request #10572: add info about update mask to API doc introduction

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #10572:
URL: https://github.com/apache/airflow/pull/10572#discussion_r476931411



##########
File path: airflow/api_connexion/openapi/v1.yaml
##########
@@ -160,6 +160,14 @@ info:
 
     For details on configuring the authentication, see
     [API Authorization](https://airflow.readthedocs.io/en/latest/security/api.html).
+
+    # Update Mask

Review comment:
       Can you move it to ``### Update`` section or ``## Conventions`` (first preferred)?
   
   




----------------------------------------------------------------
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



[GitHub] [airflow] mik-laj commented on a change in pull request #10572: add info about update mask to API doc introduction

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #10572:
URL: https://github.com/apache/airflow/pull/10572#discussion_r476940848



##########
File path: airflow/api_connexion/openapi/v1.yaml
##########
@@ -160,6 +160,14 @@ info:
 
     For details on configuring the authentication, see
     [API Authorization](https://airflow.readthedocs.io/en/latest/security/api.html).
+
+    # Update Mask
+    Update mask is available as a parameter in patch endpoints. It is used to notify the

Review comment:
       I am afraid this has little effect on performance as these are only trivial memory operations.
   
   The main reason for this is that you can get the full object with GET, update the selected fields, then send the full object and only indicate the fields to be updated.  In other words, it's necessary to perform a partial update.
   ```
   resource = request.get('/resource/my-id').json()
   resource['my-field'] = 'new-value'
   request.patch('/resource/my-id?update-mask=my-field', data=json.dumps(resource)) 
   ```
   This makes it easier for the client to use the API.




----------------------------------------------------------------
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



[GitHub] [airflow] ephraimbuddy commented on pull request #10572: add info about update mask to API doc introduction

Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on pull request #10572:
URL: https://github.com/apache/airflow/pull/10572#issuecomment-680689917


   Ok. I will update it. It was what I read from the link below that formed my explanation. https://developers.google.com/slides/how-tos/field-masks


----------------------------------------------------------------
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