[GitHub] [airflow] kaxil commented on a change in pull request #7761: [AIRFLOW-7086] /dags/paused should be a PUT

2020-03-19 Thread GitBox
kaxil commented on a change in pull request #7761: [AIRFLOW-7086] /dags/paused 
should be a PUT
URL: https://github.com/apache/airflow/pull/7761#discussion_r395353337
 
 

 ##
 File path: tests/runtime/kubernetes/test_kubernetes_executor.py
 ##
 @@ -142,9 +142,9 @@ def ensure_dag_expected_state(self, host, execution_date, 
dag_id,
 # Maybe check if we can retrieve the logs, but then we need to extend 
the API
 
 def start_dag(self, dag_id, host):
-result = self.session.get(
+result = self.session.post(
 'http://{host}/api/experimental/'
-'dags/{dag_id}/paused/false'.format(host=host, dag_id=dag_id)
+'dags/{dag_id}/pause/false'.format(host=host, dag_id=dag_id)
 
 Review comment:
   Let's change the name in a separate PR and keep this one limited to changing 
GET to POST please


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [airflow] kaxil commented on a change in pull request #7761: [AIRFLOW-7086] /dags/paused should be a PUT

2020-03-19 Thread GitBox
kaxil commented on a change in pull request #7761: [AIRFLOW-7086] /dags/paused 
should be a PUT
URL: https://github.com/apache/airflow/pull/7761#discussion_r395352636
 
 

 ##
 File path: tests/runtime/kubernetes/test_kubernetes_executor.py
 ##
 @@ -142,9 +142,9 @@ def ensure_dag_expected_state(self, host, execution_date, 
dag_id,
 # Maybe check if we can retrieve the logs, but then we need to extend 
the API
 
 def start_dag(self, dag_id, host):
-result = self.session.get(
+result = self.session.post(
 'http://{host}/api/experimental/'
-'dags/{dag_id}/paused/false'.format(host=host, dag_id=dag_id)
+'dags/{dag_id}/pause/false'.format(host=host, dag_id=dag_id)
 
 Review comment:
   Why are we changing endpoint from `paused` to `pause`, is that intended?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [airflow] kaxil commented on a change in pull request #7761: [AIRFLOW-7086] /dags/paused should be a PUT

2020-03-19 Thread GitBox
kaxil commented on a change in pull request #7761: [AIRFLOW-7086] /dags/paused 
should be a PUT
URL: https://github.com/apache/airflow/pull/7761#discussion_r395352156
 
 

 ##
 File path: airflow/www/api/experimental/endpoints.py
 ##
 @@ -184,13 +184,11 @@ def task_info(dag_id, task_id):
 return jsonify(fields)
 
 
-# ToDo: Shouldn't this be a PUT method?
-@api_experimental.route('/dags//paused/', 
methods=['GET'])
+@api_experimental.route('/dags//pause/', 
methods=['POST'])
 
 Review comment:
   ```suggestion
   @api_experimental.route('/dags//paused/', 
methods=['POST'])
   ```


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:
us...@infra.apache.org


With regards,
Apache Git Services