Skip to content

Conversation

@dmjb
Copy link
Member

@dmjb dmjb commented Dec 10, 2025

The code previously had a factory for the RegistryDataProvider interface, which had stubbed out logic for returning an implementation of this type backed by a database. In practice, this interface was not useful when we added the DB, and so only the file-based implementation is needed.

This PR:

  1. Gets rid of the factory. The application wireup code calls the
    factory method of the file-based implementation directly when wiring
    up a file-backed instance of the server.
  2. Moves the file-based implementation and the interface under the
    inmemory package to make it clear that it is only relevant for the
    file-based storage logic.

In future, we may refactor the code to remove this interface entirely.

The code previously had a factory for the RegistryDataProvider interface
which had stubbed out logic for returning an implementation of this type
backed by a database. In practice, this interface was not useful when we
added the DB, and so only the file-based implementation is needed.

This PR:

1) Gets rid of the factory. The application wireup code calls the
   factory method of the file-based implementation directly when wiring
   up a file-backed instance of the server.
2) Moves the file-based implementation and the interface under the
   inmemory package to make it clear that it is only relevant for the
   file-based storage logic.

In future, we may refactor the code to remove this interface entirely.
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.81%. Comparing base (0149b0b) to head (ff627d6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #285      +/-   ##
==========================================
+ Coverage   61.66%   61.81%   +0.15%     
==========================================
  Files          69       67       -2     
  Lines        5882     5848      -34     
==========================================
- Hits         3627     3615      -12     
+ Misses       2012     1991      -21     
+ Partials      243      242       -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.

@dmjb dmjb merged commit b3c3f12 into main Dec 11, 2025
11 checks passed
@dmjb dmjb deleted the remove-provider-factory branch December 11, 2025 09:06
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.

4 participants