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

refactor(configs): make TOML file an optional source of application configuration #2185

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

SanchithHegde
Copy link
Member

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This PR refactors the application configuration deserialization code to make the TOML file as an optional source of application configuration.

Motivation and Context

The TOML file was made as a required source of application configuration when support for deserializing application configuration from environment variables was absent. Since we have support for environment variables now, we can make the TOML file as an optional source.

How did you test it?

Ran it locally without config/development.toml, binary does not complain about missing development.toml file.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@SanchithHegde SanchithHegde added A-framework Area: Framework S-waiting-on-review Status: This PR has been implemented and needs to be reviewed C-refactor Category: Refactor labels Sep 18, 2023
@SanchithHegde SanchithHegde requested a review from a team as a code owner September 18, 2023 14:58
@SanchithHegde SanchithHegde self-assigned this Sep 18, 2023
@SanchithHegde SanchithHegde added this pull request to the merge queue Sep 20, 2023
Merged via the queue into main with commit 69fbebf Sep 20, 2023
10 checks passed
@SanchithHegde SanchithHegde deleted the optional-config-file branch September 20, 2023 07:17
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-framework Area: Framework C-refactor Category: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants