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 2019/08/26 20:17:27 UTC

[GitHub] [airflow] jrowen commented on a change in pull request #5900: [AIRFLOW-5313] Add params support for awsbatch_operator

jrowen commented on a change in pull request #5900: [AIRFLOW-5313] Add params support for awsbatch_operator
URL: https://github.com/apache/airflow/pull/5900#discussion_r317779449
 
 

 ##########
 File path: tests/contrib/operators/test_awsbatch_operator.py
 ##########
 @@ -94,6 +97,7 @@ def test_execute_with_failures(self):
         client_mock.submit_job.assert_called_once_with(
             jobQueue='queue',
             jobName='51455483-c62c-48ac-9b88-53a6a725baa3',
+            parameters={},
             containerOverrides={},
             jobDefinition='hello-world'
         )
 
 Review comment:
   > Please add tests for parameter content (esp. the actual default value; the class itself uses a default of `None`) and test "bad" parameter values
   
   I modeled the testing after the `containerOverrides` but can add some more testing if desired.
   
   > Q: should the class init translate `None` into `{}` as an effective default?
   
   The [`submit_job`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch.html#Batch.Client.submit_job) will accept either `None` or `{}`--I'm happy to change the class init to the latter if desired.
   
   > Q: does the client have any default params? If it does, should the operator totally override all of them or just merge specific values into the client defaults? How does adding params to the operator change the job-request payload?
   
   Default parameters would be defined as part of each specific jobdef and any values passed into the operator will [override the defaults](https://docs.aws.amazon.com/batch/latest/userguide/example-job-definitions.html#example-use-parameters).
   

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