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 2021/05/26 07:26:42 UTC

[GitHub] [airflow-client-python] msumit opened a new issue #21: trigger dag api is broken

msumit opened a new issue #21:
URL: https://github.com/apache/airflow-client-python/issues/21


   Client version: 2.1.0
   
   Code:
   ```
       dag_id = "example_bash_operator"
       dag_run_api_instance = dag_run_api.DAGRunApi(api_client)
       try:
           # Create a DAGRun object
           dag_run = DAGRun(
               dag_run_id='some_test_run',
               dag_id=dag_id,
               external_trigger=True,
           )
           api_response = dag_run_api_instance.post_dag_run(dag_id, dag_run)
           pprint(api_response)
       except airflow_client.client.exceptions.OpenApiException as e:
           print("Exception when calling DAGRunAPI->post_dag_run: %s\n" % e)
   ```
   
   Error:
   ```
   HTTP response body: {
     "detail": "Property is read-only - 'dag_id'",
     "status": 400,
     "title": "Bad Request",
     "type": "http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/latest/stable-rest-api-ref.html#section/Errors/BadRequest"
   }
   ```
   


-- 
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-client-python] fanqingsong commented on issue #21: trigger dag api is broken

Posted by GitBox <gi...@apache.org>.
fanqingsong commented on issue #21:
URL: https://github.com/apache/airflow-client-python/issues/21#issuecomment-875313642


   I encountered the same problem.
   and I found the test case (airflow_client/test/test_dag_run_api.py) is just shell, with empty test function. 
   so I think the quality cannot be assured currently.
   mybe using raw REST API is a good choice.
   


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow-client-python] zjaxxon commented on issue #21: trigger dag api is broken

Posted by GitBox <gi...@apache.org>.
zjaxxon commented on issue #21:
URL: https://github.com/apache/airflow-client-python/issues/21#issuecomment-894115896


   Same problem. It seems you must provide a dag_id to initialize a DAGRun while it gives this read-only error in post_dag_run.


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow-client-python] hterik commented on issue #21: trigger dag api is broken

Posted by GitBox <gi...@apache.org>.
hterik commented on issue #21:
URL: https://github.com/apache/airflow-client-python/issues/21#issuecomment-948369135


   Same problem here after following https://github.com/apache/airflow-client-python/blob/master/airflow_client/docs/DAGRunApi.md#post_dag_run.
   **DAGRun** requires dag_id in its constructor, but if you provide one the **post_dag_run** will give the **Property is read-only** error. 
   So basically it's not possible to start dagruns using the client.
   
   airflow-client-python.git rev bf439f3f92
   Airflow 2.2.0


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow-client-python] christhekeele commented on issue #21: trigger dag api is broken

Posted by GitBox <gi...@apache.org>.
christhekeele commented on issue #21:
URL: https://github.com/apache/airflow-client-python/issues/21#issuecomment-963695973


   I have worked around this by re-generating the api client for airflow 2.3.0 with [this patch](https://github.com/apache/airflow/pull/19155) applied. Available from [my fork](https://github.com/christhekeele/airflow-client-python/tree/2.3.0). You can install it in a requirements.txt via:
   
   ```
   # apache-airflow-client==2.1.0
   -e git://github.com/christhekeele/airflow-client-python.git@2.3.0#egg=apache-airflow-client
   ```


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow-client-python] hterik commented on issue #21: trigger dag api is broken

Posted by GitBox <gi...@apache.org>.
hterik commented on issue #21:
URL: https://github.com/apache/airflow-client-python/issues/21#issuecomment-948381029


   Probably caused by https://github.com/apache/airflow-client-python/issues/4 


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org