Skip to content
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

ERv2: Support for KMS #4819

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

ERv2: Support for KMS #4819

wants to merge 1 commit into from

Conversation

lechuk47
Copy link
Contributor

@lechuk47 lechuk47 commented Jan 23, 2025

Support KMS in Erv2

Copy link
Contributor

@esron esron left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 51 to 52
if id not in self._factories and "default" in self._factories:
return self._factories["default"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make default explicit instead of a hard coded string? For example, ObjectFactory register all factories in __init__

class ObjectFactory(Generic[T]):
    def __init__(self, factories, default_factory = None) -> None:
        self._factories = factories
        self._default_factory = default_factory

    def get_factory(self, id: str) -> T:
        if id not in self._factories and self._default_factory:
            return self._default_factory
        return self._factories[id]

init once and immutable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like it. Added.

@lechuk47 lechuk47 force-pushed the erv2_kms branch 3 times, most recently from 63505e3 to 6e6fd1a Compare January 24, 2025 10:25
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.

3 participants