Skip to content

Conversation

@mathetake
Copy link
Member

@mathetake mathetake commented Nov 15, 2025

Description

This commit decouples "runtime filter config" that is derived from the filterapi.Config to be able to reuse the code in dynamic modules port #90.

Related Issues/PRs (if applicable)

Preparation for #90


// LoadConfig updates the configuration of the external processor.
func (s *Server) LoadConfig(ctx context.Context, config *filterapi.Config) error {
backends := make(map[string]*processorConfigBackend, len(config.Backends))
Copy link
Member Author

Choose a reason for hiding this comment

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

note: mainly this PR is moving this logic and the processorConfig* structs into filterapi/runtimefc package. Others are mechanical

Signed-off-by: Takeshi Yoneda <[email protected]>

// Package runtimefc is the API for the construct of runtime filter configurations parsed from filterapi.Config.
//
// Decoupled from filterapi to avoid circular dependencies.
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the reason why we cannot have this directly inside the filterapi package

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at it, it doesn't feel quite right, then, does it?
I mean, we have an "api" package that depends on implementation-specific things like the backend-auth, because we need to call impl-specific constructors from this package...

Perhaps we need to split this differently?

Signed-off-by: Takeshi Yoneda <[email protected]>
@mathetake mathetake marked this pull request as ready for review November 15, 2025 01:23
@mathetake mathetake requested a review from a team as a code owner November 15, 2025 01:23
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Nov 15, 2025
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 83.63636% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.07%. Comparing base (a8bc95a) to head (196f287).

Files with missing lines Patch % Lines
internal/filterapi/runtimefc/runtimefc.go 85.18% 2 Missing and 2 partials ⚠️
internal/extproc/server.go 50.00% 2 Missing and 1 partial ⚠️
internal/extproc/completions_processor.go 66.66% 0 Missing and 1 partial ⚠️
internal/extproc/messages_processor.go 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1546      +/-   ##
==========================================
+ Coverage   84.06%   84.07%   +0.01%     
==========================================
  Files         149      150       +1     
  Lines       12874    12879       +5     
==========================================
+ Hits        10822    10828       +6     
+ Misses       1430     1428       -2     
- Partials      622      623       +1     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mathetake
Copy link
Member Author

PTAL @nacx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants