Skip to content

Add DeclarativeConfigContext #7293

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jack-berg
Copy link
Member

Refactor declarative config to encapsulate config context and state into a new carrier object, DeclarativeConfigContext.

Benefits:

  • Cleans up Factory interface by reducing number of arguments
  • Makes it easier to test because SPI loading and closeables tracking is encapsulated in an instance which can be mocked and spied. Previously these were managed via static helper methods.
  • Abstracts SPI loading to a single place, making Move declarative config to permanent home #7292 easier
  • ~200 fewer lines of code

@jack-berg jack-berg requested a review from a team as a code owner April 22, 2025 21:32
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

Attention: Patch coverage is 91.26214% with 9 lines in your changes missing coverage. Please review.

Project coverage is 90.01%. Comparing base (b468a2e) to head (1a8baf3).

Files with missing lines Patch % Lines
...incubator/fileconfig/DeclarativeConfigContext.java 70.96% 8 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7293      +/-   ##
============================================
- Coverage     90.04%   90.01%   -0.04%     
+ Complexity     6916     6913       -3     
============================================
  Files           787      788       +1     
  Lines         20864    20844      -20     
  Branches       2023     2023              
============================================
- Hits          18788    18762      -26     
- Misses         1439     1442       +3     
- Partials        637      640       +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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