-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Refactor StorageFactory class to use registration functionality #1944
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: jgbradley1 <654554+jgbradley1@users.noreply.github.com>
The Python CI tests are failing and the semver check is failing. Please run sermversioner to pass the semver check. |
Co-authored-by: jgbradley1 <654554+jgbradley1@users.noreply.github.com>
I've added a semversioner change record to fix the failing semver check. The change is marked as a minor version update with the description "Refactored StorageFactory to use a registration-based approach". Commit: de9987f |
The |
Run |
Co-authored-by: jgbradley1 <654554+jgbradley1@users.noreply.github.com>
I've fixed the failing Python CI tests. The issues were:
I addressed these by:
The storage tests are now passing. Commit: 3b4235b Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
I've run Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR refactors the
StorageFactory
class to use a registration-based approach, similar to how theModelFactory
class is designed. This improves the extensibility and maintainability of the storage system.Changes
get_storage_types()
: Returns a list of all registered storage typesis_supported_storage_type()
: Checks if a storage type is registeredregister
method to accept a callable creator function instead of a typestorage_types
attributeExample Usage
All tests have been updated and are passing.
Fixes #1943.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.fwupd.org
/usr/bin/fwupdmgr refresh
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.