Skip to content

WIP: Move ecosystem configuration to configuration file#93

Draft
kpfleming wants to merge 1 commit intogit-pkgs:mainfrom
kpfleming:ecosystem-config
Draft

WIP: Move ecosystem configuration to configuration file#93
kpfleming wants to merge 1 commit intogit-pkgs:mainfrom
kpfleming:ecosystem-config

Conversation

@kpfleming
Copy link
Copy Markdown
Contributor

@kpfleming kpfleming commented Apr 18, 2026

This is a proof-of-concept for moving the configuration of ecosystems (routes and upstream URLs) into the configuration file, instead of hard-coding them in the source code. This PoC only includes changes for Cargo and Debian, but should be sufficient to demonstrate how the technique could be applied to all ecosystems. This will provide an implementation of #56, and also be a prerequisite for #55.

Notes:

  • All routes for an ecosystem share one cache.
  • The proxy's behavior is unchanged from the current behavior if the configuration file is not provided, or does not contain an ecosystem section.
  • The proposed ecosystem configuration format allows the user to add routes to the default route, or to suppress the default route (either to replace it or to disable support for that ecosystem).
  • The proposed configuration format supports multiple upstreams for a route, but the handler code has not been modified to support multiple upstreams, so the configuration validation will fail if a user supplies more than one upstream for a route.
  • If this is merged, the existing URL properties of the upstream map in the configuration file should be removed as they will be obsolete (and are currently ignored).
  • The internal tests pass, and functional tests with the default route and multiple routes have passed locally.
  • Testing with multiple clients with a second Debian route (for debian-security) works as expected.

@kpfleming
Copy link
Copy Markdown
Contributor Author

As I'm adding more routes for Debian-style packages from various upstreams, I realize that it may be safer to have separate caches for different upstreams (not by route, but by the name of the upstream). Doing that would make the dashboard significantly more complex, though.

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