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

feat(config): support dingo.yaml config file loading with env overrides in dingo #615

Merged
merged 4 commits into from
Apr 11, 2025

Conversation

arepala-uml
Copy link
Contributor

  1. Added --config flag in cmd/dingo to make sure of custom configuration file as input.
  2. Added proper yaml tags on all fields in the dingo Config struct to enable unmarshaling from YAML.
  3. Implemented logic to load configuration from YAML first, and then override with environment variables
  4. Updated node.Run() to accept loaded config from main instead of reloading internally.
  5. Wrote unit tests to validate config loading with and without a YAML file.
  6. Executed the cmd/dingo/main.go with and without config file as input and it is working fine.

Closes #529

…dingo

Signed-off-by: Akhil Repala <arepala@blinklabs.io>
Signed-off-by: Akhil Repala <arepala@blinklabs.io>
Signed-off-by: Akhil Repala <arepala@blinklabs.io>
@arepala-uml arepala-uml marked this pull request as ready for review April 10, 2025 00:30
@arepala-uml arepala-uml requested a review from a team as a code owner April 10, 2025 00:30
Copy link
Contributor

@agaffney agaffney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. I had just one minor comment

…me panic

Signed-off-by: Akhil Repala <arepala@blinklabs.io>
@arepala-uml arepala-uml requested a review from agaffney April 10, 2025 22:29
@wolf31o2 wolf31o2 merged commit 70d4933 into main Apr 11, 2025
11 checks passed
@wolf31o2 wolf31o2 deleted the dingo_config_yaml branch April 11, 2025 22:52
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

Successfully merging this pull request may close these issues.

Support a dingo.yaml
3 participants