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/04/16 10:54:44 UTC

[GitHub] [airflow] turbaszek commented on issue #8399: WIP: Improve idempodency in CloudDataTransferServiceCreateJobOperator

turbaszek commented on issue #8399: WIP: Improve idempodency in CloudDataTransferServiceCreateJobOperator
URL: https://github.com/apache/airflow/pull/8399#issuecomment-614576331
 
 
    > 1. If user deletes transfer job, new job with same name also raises ALREADY_EXISTS error.
   >    Right now I just pass result `transfer_job` to caller (line 160 airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py). `transfer_job["STATUS"] ` will be "DELETED".
   
   In that case we should check the status of job and if it exists but is "DELETED" then we should patch this job using https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/patch
   
   So in the case of 409 and status=DELETE, the operator should change the existing job to have "ENABLED" status. 
   
   > 2. `job_name` must be in format "transferJobs/[A-Za-z0-9-._~]*[A-Za-z0-9]$". Should we check it?
   
   It will be validated by API. Having regexp checks on our side requires constant updates (if API changes and our code not we will be misleading users) 
   
   

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