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/11/20 18:09:55 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #5527: [AIRFLOW-4892] Fix connection creation via UIs

kaxil commented on a change in pull request #5527: [AIRFLOW-4892] Fix connection creation via UIs
URL: https://github.com/apache/airflow/pull/5527#discussion_r348664693
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -3041,7 +3044,13 @@ class ConnectionModelView(wwwutils.SuperUserMixin, AirflowModelView):
         'extra__google_cloud_platform__key_path': StringField('Keyfile Path'),
         'extra__google_cloud_platform__keyfile_dict': PasswordField('Keyfile JSON'),
         'extra__google_cloud_platform__scope': StringField('Scopes (comma separated)'),
-        'extra__google_cloud_platform__num_retries': IntegerField('Number of Retries'),
+        'extra__google_cloud_platform__num_retries': IntegerField(
+            'Number of Retries',
+            validators=[
+                validators.Optional(strip_whitespace=True),
+                validators.NumberRange(min=0),
+            ],
+        ),
         'extra__grpc__auth_type': StringField('Grpc Auth Type'),
         'extra__grpc__credentials_pem_file': StringField('Credential Keyfile Path'),
 
 Review comment:
   Does this need to change too ?
   
   ```diff
   - 'extra__grpc__credentials_pem_file': StringField('Credential Keyfile Path'),
   + 'extra__grpc__credential_pem_file': StringField('Credential Keyfile Path'),
   ```

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