andreax79 / airflow-code-editor

A plugin for Apache Airflow that allows you to edit DAGs in browser
Apache License 2.0
401 stars 50 forks source link

when open *.log *.dag file show file not found , and create new file save function is no working #9

Closed koasi closed 3 years ago

koasi commented 3 years ago

airflow code editor version 3.3.0 airflow version 2.0.1 python version 3.8 OS: RHEL 8 seems like a permission issue, could you give me a hint? if any i can resolve by my self. thanks.

but Git GUI is able to read *.dag.

andreax79 commented 3 years ago

Hi, please check the airflow webserver log. In case of permission error the airflow websers logs contains something like the following: [2021-03-19 18:18:24,644] {code_editor_view.py:105} ERROR - [Errno 13] Permission denied: 'filename...'

koasi commented 3 years ago

Hi thanks your reply, I'm read airflow-webserver.log or airflow-webserver.err. it didn't contain any log like that. even i change airflow.cfg\logging\logging_level = WARN, it still didn't log any error message. btw, the airflow is running via my-self account. the code editor folder tree and mount folder both can access files normal, when open the file the editor of the dag.py it show file not found. I think another possible case, the real folder path problem. is that possible ??

andreax79 commented 3 years ago

Some questions :) Which browser are you using? Could you post here your airflow.cfg? Please check if you are able to download a file via direct url, e.g.: http://localhost:8080/code_editor/files/filename.txt

koasi commented 3 years ago

Hi, I had try it, it cannot get the file... i think .... i got some thing.. possibly cause of root route of airflow was changed i was change airflow sub-route as. http://localhost:xxxx/airflow/

in the editor file list, the file action [download] the hyperlink is using http://localhost:xxxx/code_editor/files/*.py, but if I try to revise hyperlink as http://localhost:xxxx/airflow/code_editor/files/*.py, it works well.

andreax79 commented 3 years ago

I was able to reproduce the problem. There was a problem with different root URL (not '/'). Please try the new version 3.3.1, I hope it your problem is resolved.

koasi commented 3 years ago

perfect, it's resolved, CRWD are normal.