davidavdav opened a new issue #20063:
URL: https://github.com/apache/airflow/issues/20063


   ### Apache Airflow version
   
   2.1.4
   
   ### Operating System
   
   linux
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-amazon==2.2.0
   apache-airflow-providers-celery==2.0.0
   apache-airflow-providers-cncf-kubernetes==2.0.2
   apache-airflow-providers-docker==2.1.1
   apache-airflow-providers-elasticsearch==2.0.3
   apache-airflow-providers-ftp==2.0.1
   apache-airflow-providers-google==5.1.0
   apache-airflow-providers-grpc==2.0.1
   apache-airflow-providers-hashicorp==2.1.0
   apache-airflow-providers-http==2.0.1
   apache-airflow-providers-imap==2.0.1
   apache-airflow-providers-microsoft-azure==3.1.1
   apache-airflow-providers-mysql==2.1.1
   apache-airflow-providers-postgres==2.2.0
   apache-airflow-providers-redis==2.0.1
   apache-airflow-providers-sendgrid==2.0.1
   apache-airflow-providers-sftp==2.1.1
   apache-airflow-providers-slack==4.0.1
   apache-airflow-providers-sqlite==2.0.1
   apache-airflow-providers-ssh==2.1.1
   
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   We tend to trigger dag runs by some external event, e.g., a media-file 
upload, see #19745.  It is useful to use the media-file path as a dag run id.  
The media-id can come with some partial path, e.g., `path/to/mediafile`.  All 
this seems to work fine in airflow, but we can't figure out a way to use the 
such a dag run id in the REST API, as the forward slashes `/` interfere with 
the API routing.  
   
   ### What happened
   
   When using the API route `api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` in, 
e.g., a HTTP GET, we expect a dag run to be found when `dag_run_id` has the 
value `path/to/mediafile`, but instead a `.status: 404` is returned.  When we 
change the `dag_run_id` to the format `path|to|mediafile`, the dag run is 
returned. 
   
   ### What you expected to happen
   
   We would expect a dag run to be returned, even if it contains the character 
`/`
   
   ### How to reproduce
   
   Trigger a dag using a dag_run_id that contains a `/`, then try to retrieve 
it though the REST API. 
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to