dagu icon indicating copy to clipboard operation
dagu copied to clipboard

Issue with configuration

Open simmia24 opened this issue 2 years ago • 8 comments

Encountering configuration issues while attempting to use environment variables for configuration. Authentication is not functioning as expected with this approach. Although using admin YAML resolves the issue, but unable to start a DAG through the UI.

simmia24 avatar Mar 23 '23 10:03 simmia24

Hi @simmia24 👋 Is it possible to provide the admin.yaml and the DAG file to reproduce the problem on my local?

yottahmd avatar Mar 23 '23 10:03 yottahmd

configs.zip

Hi @yohamta

I have attached admin.yaml with dag file.

simmia24 avatar Mar 27 '23 04:03 simmia24

@simmia24 Thank you for attaching the file! I noticed something in your admin.yaml file that might be causing an issue. Could you try commenting out the line below and see if that solves the problem?

- command: /Users/simranarora/dagu/bin/dagu                 # default: dagu
+ # command: /Users/simranarora/dagu/bin/dagu                 # default: dagu

yottahmd avatar Mar 28 '23 15:03 yottahmd

Hi @yohamta
Issue is resolved with your solution. Thank You for your help. Can you provide information on how the "command" key was causing an issue? It would be much appreciated if you could elaborate on this.

simmia24 avatar Mar 29 '23 05:03 simmia24

@simmia24 I'm glad to hear that the issue has been resolved with my solution. Regarding the "command" key in the config, we plan to remove it as it is currently unnecessary. If the "command" key is present and causing issues, it may be due to differences in the dagu path or insufficient permissions. We understand that errors can be hard to understand, so we're working to improve this in the future. If you have any further issues or questions, please don't hesitate to create another issue. Thanks!

yottahmd avatar Apr 02 '23 14:04 yottahmd

Hi @yohamta, while that solution may have resolved the issue for simran. I did notice that there was a difference in the expected environment variables in the source code as compared to the documentation.

For reference, The expected environment variables from the source code are the following,

	viper.BindEnv("isBasicAuth", "DAGU_IS_BASICAUTH")
	viper.BindEnv("basicAuthUsername", "DAGU_BASICAUTH_USERNAME")
	viper.BindEnv("basicAuthPassword", "DAGU_BASICAUTH_PASSWORD")

However, the mentioned environment variables in the documentation are as given, image src: https://dagu.readthedocs.io/en/latest/auth.html

Shall I drop a PR to fix the docs?

dat-adi avatar Sep 03 '23 10:09 dat-adi

Hey @dat-adi 👋 Thank you for spotting the issue! I'd really appreciate it if you could submit a pull request to fix the document 🙏 You can find the file here: https://github.com/dagu-dev/dagu/blob/main/docs/source/config.rst

yottahmd avatar Sep 03 '23 10:09 yottahmd

Hi @yohamta, I've raised the PR for the same. Hope it helps! :D

dat-adi avatar Sep 03 '23 10:09 dat-adi