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!: Configuration settings for services exposed by heimdall simplified #2089

Merged
merged 22 commits into from
Jan 9, 2025

Conversation

dadrus
Copy link
Owner

@dadrus dadrus commented Jan 9, 2025

Related issue(s)

None

Checklist

  • I agree to follow this project's Code of Conduct.
  • I have read, and I am following this repository's Contributing Guidelines.
  • I have read the Security Policy.
  • I have referenced an issue describing the bug/feature request.
  • I have added tests that prove the correctness of my implementation.
  • I have updated the documentation.

Description

This PR refactors heimdall’s serve configuration to improve clarity and eliminate redundancy. Currently, the configuration under the serve property contains separate settings for proxy and decision operation modes, which are mutually exclusive but largely similar. Additionally, settings for management service are included under the same serve property, while settings for other services, such as metrics and profiling, are not.

The current structure looks like this:

serve:
  proxy:
    port: 4455
    # other proxy settings

  decision:
    port: 4456
    # other decision settings

  management:
    port: 4457
    # other management service settings

metrics:
  # metrics related settings

# ...

This configuration feels unnecessarily complex, as proxy and decision modes share many settings but are configured separately. Moreover, management and other services aren’t grouped logically, making the structure harder to follow.

To address these issues, this PR simplifies the configuration by merging the proxy and decision settings directly under the serve property and moving the management settings to the top level. The new structure is as follows:

serve:
  port: 4455
  # other unified settings

management:
  port: 4457
  # other management service settings

# other settings as they were before this PR

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.37%. Comparing base (c579122) to head (3e9e2b9).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2089      +/-   ##
==========================================
- Coverage   89.45%   89.37%   -0.09%     
==========================================
  Files         271      272       +1     
  Lines       11487    11474      -13     
==========================================
- Hits        10276    10255      -21     
- Misses        970      975       +5     
- Partials      241      244       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dadrus dadrus merged commit 02d91d6 into main Jan 9, 2025
28 checks passed
@dadrus dadrus deleted the refactor/serve_settings branch January 9, 2025 14:12
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.

1 participant