Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is dagu reading irrelevant YAML files? #199

Closed
kseistrup opened this issue Jul 18, 2022 · 5 comments
Closed

Why is dagu reading irrelevant YAML files? #199

kseistrup opened this issue Jul 18, 2022 · 5 comments

Comments

@kseistrup
Copy link

I started dagu with dagu server in my homedir [on Linux], and now the webui asks me to check three “errors below”. Those “errors” are — according to dagu — incompatible YAML errors, but why on Earth is dagu reading YAML files that has got nothing to do with dagu? Is it simply scanning the homedir and reading each and every YAML file it can find?

@kseistrup kseistrup changed the title Why is dagu eading irrelevant YAML files? Why is dagu reading irrelevant YAML files? Jul 18, 2022
@yottahmd
Copy link
Collaborator

yottahmd commented Jul 19, 2022

@kseistrup
Dagu reads YAML files placed in the current directory unless you set the dags config in the admin config file.
Please create ~/.dagu/admin.yaml if not exist. The format is below.

host: <hostname for web UI address>                          # default value is 127.0.0.1
port: <port number for web UI address>                       # default value is 8000
dags: <the location of DAG configuration files>              # default value is current working directory

I suppose the default DAG directory should not be the current directory but other directory such as ~/.dagu/dags. We'll fix this soon.

@kseistrup
Copy link
Author

Thanks.

dagu should definitely not find random YAML files in the homedir.

Using ~/.dagu/dags is acceptable, but you should consider following the XDG Base Directory Specification:

That way configuration files would per default go to ~/.config/dagu/ and DAGs could go in ~/.local/share/dagu/ (unless, of course, the $XDG_* variables says otherwise.

@kseistrup
Copy link
Author

PS: You may want to mention the “Dagu reads YAML files placed in the current directory” in the quick start so that people are not in for a surprise if the follow the quick start without having read the entire README.

@yottahmd
Copy link
Collaborator

yottahmd commented Jul 19, 2022

@kseistrup Thanks a lot! We will modify the default paths to conform to the standard (XDGBDS) while also checking the specifications of other OSS such as Airflow.

PS: You may want to mention the “Dagu reads YAML files placed in the current directory” in the quick start so that people are not in for a surprise if the follow the quick start without having read the entire README.

That's truly necessary. I just updated the quick start on the README.

@yottahmd
Copy link
Collaborator

This issue is fixed by #207
We use ~/.dagu/dags as the default path for DAGs for now to maintain consistency.
But we may change it in the future major version release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants